curl-and-php
47 - Maximum (20) redirects followed -- bug?
Date: Mon, 18 Sep 2006 22:51:31 +0100
Hi
I'm writing a URL checker, I'm fetching URL's using the code below, however
the code always fails to retreive the URL shown below, giving the error "47
- Maximum (20) redirects followed"
But if I paste the same URL in a browser is loads fine.
Is this a bug in the curl code?
is there anything I can do to fetch the URL?
****************
$url = "http://YTB.com/GetPaidNow";
$ch=curl_init();
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_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$buf = curl_exec ($ch);
$errnum = curl_errno($ch);
echo curl_errno($ch) . " - " . curl_error($ch) . "<br>";
curl_close ($ch);
****************
Thanks
Peter
_________________________________________________________________
Download the new Windows Live Toolbar, including Desktop search!
http://toolbar.live.com/?mkt=en-gb
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-09-18