View Full Version : XML and PHP
muddysmurf
10-29-2009, 02:16 PM
I have my site using a php database, and I have a flash movie that is importing an XML file for the data.
I was wondering if there is a way for my clients to update the XML file? Kinda like a CMS for a website.
tom92909
10-29-2009, 03:14 PM
Yes. I have done that very thing on two different sites.
I have a PHP, MySQL / DataAssist created Admin page that I created to perform the management function. Add, Edit, Update that kind of thing.
I have a Button that physically WRITES (fwrite) the XML file output that I hand coded to meet the XML requirements.
All in all it works very well. Once the new file is written the Flash file will instantly recognize the changes the next time that page is opened.
Justin Nemeth
10-29-2009, 05:24 PM
PHP has a pretty cool library called SimpleXML that can also be used to read/write XML files pretty easily. Check it out at http://us2.php.net/simplexml.
For your purposes, it might be easier to just write the XML file yourself similar to what Tom is doing.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.