sharal Posted September 15, 2009 Share Posted September 15, 2009 Hi I'm pretty new with parsing xml via php, i've tested some queries on some of my own xml documents, which were succesful using some very simple pieces of code. Now i wanted to do exactly the same, just with my character on the wow-armory. However, armory doesn't return any xml. This is the code i've been attempting it with: <?php // Main source below // http://eu.wowarmory.com/character-sheet.xml?r=Vashj&n=$user $user = "Sháral"; $file = "http://eu.wowarmory.com/character-sheet.xml?r=Vashj&n=$user"; $xml = simplexml_load_file("$file"); echo $xml->getName() . "<br />"; foreach($xml->children() as $child) { echo $child->getName() . ": " . $child . "<br />"; } ?> Naturally, all i'm attempting here is to output the parent and the child categories from the xml source - i don't intend to draw any data from them untill it works. Hope you can help me EDIT: I have just discovered that armory blocks the server ip address doing the request if the request is fired too quickly, anyway to work around this as well? (something like only sending small packages) /Sharal Link to comment https://forums.phpfreaks.com/topic/174358-retrieving-xml-data-from-wow-armory/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.