http POST

From: Date: Fri, 07 Apr 2000 19:47:18 +0000
Subject: http POST
Groups: php.dev 
Request: Send a blank email to php-dev+get-17713@lists.php.net to get a copy of this message
Greetings all, I need some help with HTTP transactions. I am opening a socket and using fputs to send a request to a URL. Like such: // try to connect to Web server $connection = fsockopen("www.somedomain.com", 80, &$error_number, &$error_description); // send transaction fputs($connection, "GET /test/testOAS?123\r\n"); fputs($connection, "\r\n"); this works fine. I attempted to simply change the method to a POST and send the data on another line but it ignores the data sent. // try to connect to Web server $connection = fsockopen("www.somedomain.com", 80, &$error_number, &$error_description); // send transaction fputs($connection, "POST /test/testOAS\r\n"); fputs($connection, "123\r\n"); fputs($connection, "\r\n"); This hit the URL but the data attached, "123", was ignored. What is the correct syntax for appending data to a post transaction. I have attemped to read the rfc from www.w3.org but I'm still having a hard time. Thanks, Pete Tamisin peter.tamisin@knowledgestorm.com

« previous php.dev (#17713) next »