Our blog
Accessing Raw XML Posted to a Script
If you have a script that is receiving posted XML for whatever reason and are trying to access this XML without any filtering, escaping etc then this is the solution you are looking for.
Instead of trying to access via $_POST etc, you can simply call the following:
This will then allow you to load it into Simple XML for example for further processing
-
$sx = simplexml_load_string($xml);
-
if($sx){
-
....
-
}
RSS Feed