Timeout with file_get_contents and curl
Im having a problem with file_get_contents and curl,
(unable to connect to ...)
Even to google...
Curl is active and fopen too ... Any idea?
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/");
No comments:
Post a Comment