I am writing code to read and respond to Paypal's IPN (Instant Payment Notification) system. They are POSTing to my url and I need to POST back to them all their form variables EXACTLY as receieved plus add an acceptance variable to confirm reception.
There are 23 form variables that they send along with their values. I know that I can loop through all the POST variables like the following:
echo "******HTTP_POST_VARS*****************<br>";
reset($HTTP_POST_VARS);
while(list($key, $value) = each($HTTP_POST_VARS))
{
echo "$key = $value<br>";
}
but I would prefer not to use this if it can be read as a block.
In Perl I could do the following:
read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
Is there something similiar in PHP?