<![CDATA[Latest posts for the topic "Hàm CURL đến Google"]]> /hvaonline/posts/list/8.html JForum - http://www.jforum.net Hàm CURL đến Google http://nguoiquang.net/search/savefile.php?q=kye
Chúng tôi rất tiếc nhưng đã xảy ra lỗi. Bạn đã đạt đến giới hạn hạn ngạch của mình. Vui lòng thử lại sau. 
Code:
<? 
//----------------------------------------------------------------------------------- 
function getPage($url, $referer, $timeout, $header){ 
    if(!isset($timeout)) 
        $timeout=30; 
    $curl = curl_init(); 
    if(strstr($referer,"://")){ 
        curl_setopt ($curl, CURLOPT_REFERER, $referer); 
    } 
    curl_setopt ($curl, CURLOPT_URL, $url); 
    curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); 
    curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5))); 
    curl_setopt ($curl, CURLOPT_HEADER, (int)$header); 
    curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); 
    curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, false); //FALSE//true  
    $html = curl_exec ($curl); 
    curl_close ($curl); 
    return $html; 
} 
//----------------------------------------------------------------------------------- 
?> 


<?php 
echo getPage('http://www.google.com/trends/fetchComponent?q=l%C3%B4ng&cid=TOP_QUERIES_0_0&export=3','','30','') 
?>

]]>
/hvaonline/posts/list/45070.html#278094 /hvaonline/posts/list/45070.html#278094 GMT
Hàm CURL đến Google /hvaonline/posts/list/45070.html#278167 /hvaonline/posts/list/45070.html#278167 GMT