How to send and receive xml tool using PHP?

Asked By 10 points N/A Posted on -

Good day to all. I would like to ask about php scripting, particularly how to send and receive xml tool using PHP script. What are the steps needed for this? Is this easy to configure? Also, I would like to inquire about its key functions and importance. A detailed overview would really help. 

Answered By 0 points N/A #150828

How to send and receive xml tool using PHP?


Sending XML through PHP is very easy. You can send data in various ways but the easiest is by using CURL.

We do this by sending the XML as regular POST data but with a slight difference – the HTTP header is changed to 'text/xml'.

We then receive the POST and read the raw post data using a PHP I/O stream function.

You may have been recommended to use other functions but this is faster and doesn't require you to configure settings in your php.ini.

Anyway, this library is already packaged within PHP but you may need to enable it.
Simply find your php.ini and uncomment the line 'extension=php_curl.dll' by removing the semi-colon.

Then restart your server.

Please note, this has nothing to do with XML-RPC. Don't get this mixed up.


Related Questions