Retrieving raw data from a post
Sometimes it can by useful to send xml data to a receiving script in order to let this script perform tasks on it without user interaction, such as a webservice.
It can be done easily by using the following php code.
retrieving xml (or other) raw data from a post:
$data = trim(file_get_contents(‘php://input’)); // get the (xml) data from sender
$processed=processData($data); // do something with the data
echo $processed; // sends data back to requesting client
Tags: scripts


augustus 6th, 2009 at 09:36
Marc, volgens mij moet je hier wat meer uitleg bijgeven, want dit is wel erg kort door de bocht… of twitter het
augustus 6th, 2009 at 12:15
Zeau goed? Of snap je het nog niet