PHP的file_get_contents獲取遠程頁面內容
$content = file_get_contents("compress
無論頁面是否經過gzip壓縮
使用curl模塊同樣可解決問題
function curl_get($url
$curl = curl_init($url);
curl_setopt($curl
curl_setopt($curl
if($gzip) curl_setopt($curl
$content = curl_exec($curl);
curl_close($curl);
return $content;
}
From:http://tw.wingwit.com/Article/program/PHP/201311/20921.html