Extracting the body of the http request entity?

From: Date: Fri, 27 Apr 2001 09:24:45 +0000
Subject: Extracting the body of the http request entity?
Groups: php.general 
Request: Send a blank email to php-general+get-50582@lists.php.net to get a copy of this message
I need to write a script which extracts information POSTed by a non-browser client, and stores it on the server. With a browser client I could upload from with <input type="file"> form elements and use the PHP upload functions, but using a browser at the client end is not an option here. According to the w3c docs, POSTed content is sent in the "request entity body". Since the request has a header, it's logical that it can have a body too :-) but I don't see any PHP functionality for getting at it. Someone in another group suggested accessing a variable called $HTTP_RAW_POST_DATA, but that doesn't seem to exist when I POST data to either of my test systems, which are Linux/Apache or Win98/PWS. PHP itself must be able to extract the POSTed data - it does so when saving a POSTed file to its temporary location - but this function don't seem to be exposed in the API... is it? Thanks for any wisdom! nik

« previous php.general (#50582) next »