curl-and-php
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)
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/osdnReceived on 2004-02-03