graham23s Posted November 29, 2009 Share Posted November 29, 2009 Hi Guys, I can dump out the data from a remote xml file, but i was wondering what would be the best way to save the data to a data.xml file. code: $request = simplexml_load_file("https://site.com/feeds/xml_feed_1.0.php?wm_id=8344&site_id=8030&tracking_id=8030"); the data is returned ok i just need to save the returned data to a file. thanks for any help guys Graham Quote Link to comment https://forums.phpfreaks.com/topic/183330-save-remore-xml-to-file/ Share on other sites More sharing options...
salathe Posted November 29, 2009 Share Posted November 29, 2009 Use SimpleXMLElement::asXML with a filename. $request->asXML("data.xml"); Quote Link to comment https://forums.phpfreaks.com/topic/183330-save-remore-xml-to-file/#findComment-967729 Share on other sites More sharing options...
graham23s Posted November 30, 2009 Author Share Posted November 30, 2009 Hi Buddy, That worked perfectly thanks mate Graham Quote Link to comment https://forums.phpfreaks.com/topic/183330-save-remore-xml-to-file/#findComment-968504 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.