faeldray Posted July 25, 2007 Share Posted July 25, 2007 This is probably a really easy-to-answer question but I'm having trouble finding that answer. What I'm trying to do it take a value from this page (http://armory.worldofwarcraft.com/character-talents.xml?r=Hydraxis&n=Nicora) and using some sort of PHP script, put the value into this Javascript (http://www.wowhead.com/?talent=embed). The value I want is the talentTree value (all those numbers): <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="/layout/character-talents.xsl"?> <page globalSearch="1" lang="en_us" requestUrl="/character-talents.xml"> <characterInfo> <character battleGroup="Emberstorm" charUrl="r=Hydraxis&n=Nicora" class="Hunter" classId="3" faction="Horde" factionId="1" gender="Female" genderId="1" guildName="Hunters Mark" guildUrl="r=Hydraxis&n=Hunters+Mark&p=1" lastModified="July 24, 2007" level="40" name="Nicora" race="Tauren" raceId="6" realm="Hydraxis" title=""/> <talentTab> <talentTree value="[b]3313322122220200000000000000000000000000000300000000000000000000[/b]"/> </talentTab> </characterInfo> </page> And here's what the javascript will look like in the end: <script type="text/javascript"> var mt_css = 'blahblahblah.css'; var mt_width = 500; var mt_class = 2; var mt_build = '3313322122220200000000000000000000000000000300000000000000000000'; </script> <script src="http://www.wowhead.com/talent/include.js" type="text/javascript"></script> So how do I put the two together? Quote Link to comment Share on other sites More sharing options...
deadimp Posted July 25, 2007 Share Posted July 25, 2007 Look into the PHP documentation, see if you can't find an XML parser. Just looking at the function reference, I saw SimpleXML. You can get the file using an appropriate function that can download external files. Quote Link to comment Share on other sites More sharing options...
faeldray Posted July 25, 2007 Author Share Posted July 25, 2007 Thanks, but I can't use SimpleXML and I don't know what function to use for downloading external files. I know it's a lot of trouble but could I get any other suggestions? Quote Link to comment 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.