Accessing Raw XML Posted to a Script
Dec 21, 2009 · 1 minute readCategory: php
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
Instead of trying to access via $_POST etc, you can simply call the following:
$xml = file_get_contents('php://input');
This will then allow you to load it into Simple XML for example for further processing
$sx = simplexml_load_string($xml);
if($sx){
....
}