I am receiving XML POSTED via curl, and can successfully write the posted XML to a file, so I know that its being posted successfully.
I really need to access the posted XML and create an array as soon as it is received, so I can set up variables and prepare the posted XML for a database Insert.
Can anyone show an example of how I would access the XML, received as:
$postXML = trim(file_get_contents('php://input'));
Which is:
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<first_name>Larry</first_name>
<last_name>Jones</last_name>
<url>www.somewhere.com</url>
</data>
I need to access <first_name>, <last_name> and <url> and create as variables for processing and DB inserts.
Any help is very much appreciated!