TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-15-2011, 07:46 PM   #141 (permalink)
The Visitor
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
javelin is on a distinguished road
Default

Sorry for bumping an old thread.

I'm also trying to grab information from the wowarmory using PHP, but they've changed all the armory setup and the examples here no longer work.

While troubleshooting the code, I've come across a couple of foreach loops that i dont understand and can't find any reference material on the net.

Code:
foreach ($profile_xml->characterInfo->character as $char)
Code:
foreach ($XMLstream->guildInfo->guild->members->character as $char)
Could someone give me some insight as to whats happening in these loops? What is the "->" function doing here?

Thanks
javelin is offline  
Reply With Quote
Old 03-15-2011, 08:53 PM   #142 (permalink)
The Contributor
 
mortisimus's Avatar
 
Join Date: Sep 2007
Location: London, UK
Posts: 47
Thanks: 4
mortisimus is on a distinguished road
Default

They allow the $XMLstream variable to access different tags in the xml page.

Assuming $XMLstream is assigned to the pull_xml() function from the class decleration variable.

So basically

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<characterInfo>
<character>Data</character>
</characterInfo>
$profile_xml->characterInfo->character would give "Data" or something like that. I've neither played wow, nor written php for a long time.

If I recall though, the armory no longer uses xml, it's now html and javascript, so the code no longer works..
mortisimus is offline  
Reply With Quote
Old 03-15-2011, 11:17 PM   #143 (permalink)
The Visitor
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
javelin is on a distinguished road
Default

Ok, thanks that makes a lot more sense. I've never dealt with XML files so it had me really confused, particularly because the xml_pull wasn't giving XML formated data.

Guess, I'll have to use regular expressions to pattern out the data I need.
javelin is offline  
Reply With Quote
Old 03-21-2011, 12:05 PM   #144 (permalink)
The Visitor
 
darque's Avatar
 
Join Date: Mar 2011
Location: NH
Posts: 1
Thanks: 0
darque is on a distinguished road
Default

Actually that isn't entirely true. The old armory xml streams are still available. Blizz has stated in a blue post that they will be adding xml to the main site (but haven't said when of course). You can access the old armory xml through the old URLs.

such as:

PHP Code:
www.wowarmory.com/guild-info.xml?r=REALMNAME&n=GUILDNAME&p=
Note: the guild-info.xml was broken in the US for about a week recently. There is a blue post about it at:

http://us.battle.net/wow/en/forum/topic/2228413384
darque is offline  
Reply With Quote
Old 06-25-2012, 12:34 PM   #145 (permalink)
The Wanderer
 
Join Date: May 2012
Location: usa
Posts: 6
Thanks: 0
cheapcnjerseys is on a distinguished road
Default

Nike NFL Jerseys from china, Nike NFL Jerseys online,cheap Nike NFL Jerseys,2012 nike nfl jerseys, nike nfl women jerseys,buy jerseys online, soccer jerseys shop online, nfl jerseys store online
cheapcnjerseys is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:33 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design