Archive for the ‘scripts’ Category

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 [...]

Tags: