cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-php mailing list Archives

RE: POST requests require a Content-length header error

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 3 Feb 2004 14:49:11 +0100 (CET)

On Tue, 3 Feb 2004, Gary Wakerley wrote:

> curl_setopt($ch, CURLOPT_URL,"http://www.google.com/search?q="
> . $trimmed . "\" target=\"_blank\" title=\"Look up
> " . $trimmed . " on Google\">Click here");

This looks like a mighty weird URL.

> curl_setopt($ch, CURLOPT_POST, 1); // set POST method
> curl_setopt($ch, CURLOPT_POSTFIELDS,0);

... and you're not posting any data!

Since you're not posting anything, of course there isn't any lenght of it. Why
are you posting in the first place when you provide the search string in the
URL already?

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-02-03

These mail archives are generated by hypermail.

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

File upload with ASP.NET