Friday, September 29, 2006

Retrieving XML With Curl and SimpleXML - PHP Tutorials

Retrieving XML With Curl and SimpleXML - PHP Tutorials: "Retrieving XML With Curl and SimpleXML"
PHP 5 introduces SimpleXML and its a perfect name as parsing XML data is truly simple. In this tutorial we'll be using curl to retrieve the XML data from a remote web server. We're going to create a class to connect to the remote web server and pass POST data to the server and based on the POST data the remote server will return valid XML. The class will parse the XML response and return an array containing the data. For the sake of simplicity in this tutorial we're not going into detail on the workings of the remote server generating the XML responses.