Re: http 411 error with cURL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux