Re: http 411 curl error [RESOLVED]

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

 



* and then Nick Wilson declared....
> hi all, 
> 
> Im getting an http 411 error when trying to post data with php's cURL
> functions. The spec says 
> 
> ***The message for this error code is "Length Required."
> The server refuses to accept the request without a defined Content-
> Length.***

Thanks to Marek for providing the hint about url encoding. FOr anyone
that has similar troubles here's the 'gotcha':

You have to urlencode() your CURLOPT_POSTFIEDS naturally, but you *also*
have to urlencode() your CURLOPT_REFERER and CURLOPT_USERAGENT strings
;-)

Cheers Marek!
-- 
Nick W

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