Re: http 411 error with cURL

From: Date: Sat, 09 Oct 2004 23:48:19 +0000
Subject: Re: http 411 error with cURL
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-199089@lists.php.net to get a copy of this message
Nick Wilson wrote:
* and then Marek Kilimajer declared....
Nick Wilson wrote:
* and then Marek Kilimajer declared....
Opps! CURLOPT_HTTPHEADER I go play with it now ;-)
Sorry, I got it mixed :) But you figured it out.
do you know if the lenght includes the args? like this strlen("val=$var&val2=$var2");
This one. Don't forget to urlencode where necessary
hmmm.. well, this is giving me the same curl_errno(22) http 411 $postF="s=$s&e=$e&a=" . urlencode($a) . "&em=" . urlencode($em) ."&x=" . $x . "&b=$b&t=" . urlencode($t) . "&p=$p"; $postL=strlen($postF); curl_setopt($ch, CURLOPT_POSTFIELDS,$postF); curl_setopt($ch, CURLOPT_HTTPHEADERS, "Content-Length: $postL");
CURLOPT_HTTPHEADER - An array of HTTP header fields to set. curl_setopt($ch, CURLOPT_HTTPHEADERS, array('Content-Length' => $postL));
$result=curl_exec($ch);


« previous php.general (#199089) next »