cURL / Mailing Lists / curl-and-php / Single Mail


Retrieve problems for some sites ?

From: tmjb <>
Date: Wed, 12 Sep 2007 20:53:11 +0200

Hello i trying to retrieve some pages with curl.
here is the code

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01;
Windows NT 5.0)");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, "");
curl_setopt($ch, CURLOPT_VERBOSE, 1);

curl_setopt($ch, CURLOPT_URL,"");
curl_setopt($ch, CURLOPT_VERBOSE, 1);
//##THIS ONE GIVES 400 Not Found

Any when you try from browser it works ok.but with curl i get 404.

Is there anyway to simulate the same behavior as browser with curl for
this web site.
Thank You

Received on 2007-09-12