Home » questions » Can someone give me an example of a HTTP POST request?
Can someone give me an example of a HTTP POST request?
I'm trying to post form data to an external site using PHP. The request currently looks like this:
(ignore the spaces in some of the words - I added them to prevent Yahoo from truncating them)
POST /system.aspx HTTP 1.0
Host: thesitetosendto.com
Cookie: username=myusername&pass word=mypassword
Content-Type: applicat ion/x-www-form-urlen coded
Content-Length: 9
this=that
I've tried it with "Connection: Close" at the end but it causes a bad request response (invalid verb?) and also after Content-Length which gives a valid response (Status: 200) but doesn't post any data. Without "Connection: Close" the site gives no response and my script just times out while it's waiting.
Any help would be appreciated.
Thanks

Answers
jmfc
On 2006-08-14 06:52:52
C.J
On 2006-08-14 02:48:54