cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: that 400 error again

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 07 Mar 2008 14:54:09 +0100

Lorenzo Ponce wrote:
> One of those 400 websites replying...
> $addrs="http://www.alliedelec.com/Search/SearchResults.asp?N=0&page=no_results&Ntt=12345&sid=47BCBF0041617F&i=";
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, $addrs);
> curl_setopt($ch, CURLOPT_HEADER, 1);
> curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
> curl_setopt($ch, CURLOPT_TIMEOUT, 30);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
> $res=curl_exec($ch);
> curl_close($ch);
>
> What can I do in order to be able to read that page into the $res variable ?

I ran exactly this PHP code on my machine and I did not receive a 400
error. Please explain a little more what you are trying to do.

Linus
Received on 2008-03-07

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET