Forum Moderators: coopster

Message Too Old, No Replies

sending information via php and xml

         

big_jimmi

1:00 pm on Jul 18, 2007 (gmt 0)

10+ Year Member



Hi

I have a site that collects users orders with php and mysql. Im confortable with xhtml/css and php/mysql. However I now have the need to transfer these details on submission to another company. They want me to do this via xml. I know what xml is etc but have know idea how to send captured information in this format.

Can someone point me in the right direction? I know its obviously a whole topic in its self but any advise will be appreciated.

Id be capturing data on a 3 part form and then writing it to a mysql db (which i do at the min) somehow on submission i need to send this info in xml format to this company....

Do anyone have any experience there willing to share?

many thanks in advance

phparion

11:30 am on Jul 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



that third party site is probably running an xml-rpc system.

It is very easy, just generate the proper and valid xml file with all the information that third party site is asking for (it is always mentioned by them that what data you need to send for what purpose/function)

then post it to the link they have given you, you can use fsockopen or cURL(recommended) by the way make sure if it is one way or two way communication if it is two way then you will also receive some xml output from them that you would need to parse to get your desired info from it.

<snip>

[edited by: dreamcatcher at 1:21 pm (utc) on July 19, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]