Results 1 to 4 of 4
Thread: PHP and XML
-
PHP and XML
10 Feb 2009 @ 20.16 Hi,
I am developing a website with users using some XML.
I would like to know what is the best and must optimized way to read and write XML with PHP. Currently I made some test with " new DOMDocument();" it work well but is it the best way to do it?
And is it best to read a big XML that contain many info or to split it in many little XML that contain less info, and to read them one after the other?
And do you have any good tips of PHP optimizations, what not to do or use and what to make to optimize.
One last question, what happen if a user must update an XML and at the same time an other user must write in the same XML? It will create a conflict, anyone have ideas to solve that problem?
Thank youLast edited by narolis; 10 Feb 2009 at @ 21.34.
-
16 Feb 2009 @ 22.02 This tut - Build a Login and Registration System with XML - NETTUTS goes through creating a log-in system with PHP + XML, might help you out.
Site: jackfranklin.co.uk Blog: ispeakwebstuff.co.uk Project: learnitscreencasts.co.uk
I'm available for 1 to 1 lessons on HTML/CSS/PHP/Javascript/jQuery/Photoshop/Fireworks so please PM Me!
-
21 Apr 2009 @ 04.51 you can store your data in XML instead of a database. but that will cost you a lot of performance. XML is not a fast format, by no means. especially editing XML or inserting data in the middle is slow, and the parsing is slow, too. A real database with indices etc is way faster, but maybe it consumes some kb more (because of the indices), and it runs as a daemon in the background (but mysql doesn't need resources if it's idle).
So i would really strongly recommend to use MySQL...
-
21 Apr 2009 @ 07.53 I would echo Haneul on this one, and get the xml feed into a mySQL db and then use php to pull from the db.
This will save you lots of resources and if for some unknown reason the xml feed fails, your site won't go down, it just won't update. Therefore, your users are not impacted as much.
You will need to use some sort or parser, such as xpath, in order to get it into the db.



LinkBack URL
About LinkBacks












difference
hello I am trying to differentiate between HTML and XHTML HTML is...