Hi
hey Curt, I missed that one. Daniel have you looked at RFC 2616?


Curt Zirzow wrote:


* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]):


Hi there the following code doesnt seem to work, i am getting a bad request
sent back from the server, what could be the problem of something so
simple ?

$header .= "POST test.php HTTP/1.0\r\n";
$header.= "Host: host\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= 'Content-Length: ' . strlen($req) . "\n\n";
$header .= "Connection: close\n\n";
$header.= "$req\n";
$header.= "\r\n";



The last two lines should be:


 $header.= "\r\n";
 $header.= "$req"; #Note, no \n

Make sure all your headers have \r\n endings.  Technically the $req
is not part of the headers but the actual content to be sent.


Curt




--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/          |  http://www.raditha/megaupload/
Lean and mean Secure FTP applet with  |  Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB  |  with progress bar.

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



Reply via email to