PDA

View Full Version : Parsing a data file into a PHP array.


Kerberos
February 22nd, 2006, 03:31 PM
I am currently trying to import a WoW (World of Warcraft) data file into PHP. I've managed it using string replaces and then loading it natively as a PHP array. It's not particularly fault tolerant, though, and is prone to abuse if someone injects PHP code into the uploaded file.

Has anyone got any ideas for a solution, maybe involving an XML parser?, that would work better? I basically just want the file imported as a data structure.

Any ideas?

Link to file, as I dont think it agrees with phpBB (http://www.ukdotcafe.com/temp/CharactersViewer.lua)

Thanks in advance!