Code: Select all
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)");
curl_setopt($ch,CURLOPT_TIMEOUT,10);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_URL,$url);
$page=curl_exec($ch);
$status=curl_getinfo($ch,CURLINFO_HTTP_CODE);it always returns false (for both $page and $status), whereas the page in question loads quickly into my browser, and doesn't seem to have any funny business. What am I doing wrong?