How can you 'POST' to a page with sockets?
I tried:
$sent_str = "POST /ec/sock.php HTTP/1.0\n\nvar=hi";
fwrite($socket_connection,$sent_str,strlen($sent_str));
but I couldn't get a response. I have been able to get responses just fine with the GET method. Basically I am asking what a POST header looks like.
Thanks,
Jeff Davis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can you 'POST' to a page with sockets?
I tried:
$sent_str = "POST /ec/sock.php HTTP/1.0\n\nvar=hi";
fwrite($socket_connection,$sent_str,strlen($sent_str));
but I couldn't get a response. I have been able to get responses just fine with the GET method. Basically I am asking what a POST header looks like.
Thanks,
Jeff Davis
Check the RFC's for HTTP.
The content of the post is in the body of the message.