acessing xml in php sent by other script

There are several situation where we need to accept xml as input in php file which is sent by other scripts like flash/php/perl etc.

To accept xml as input in php, first you need to check that content-type which is being passed by source script has to be in "text/xml" format.

Now in your PHP script you can accept xml input by the following code.

$xml_str=file_get_contents("php://input");
//where $xml_str will have xml string passed by the source script.