我对 file_get_contents 和 curl 有疑问,
(无法连接到...)
甚至谷歌...
卷曲也很活跃,也很开放……有什么想法吗?
function curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)');
curl_setopt($ch, CURLOPT_URL,$url);
return curl_exec ($ch);
}
echo curl("http://site.com/");