curl-and-php
Retrieve problems for some sites ?
Date: Wed, 12 Sep 2007 20:53:11 +0200
Hello i trying to retrieve some pages with curl.
here is the code
<?php
$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, "http://www.crhov.co.yu/");
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$page1=curl_exec($ch);
//##THIS ONE GIVES 200 OK
curl_setopt($ch, CURLOPT_URL,"http://www.crhov.co.yu/?Opcija=1");
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$page2=curl_exec($ch);
//##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
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-12