WoW Roster PHP Class
I am working on a PHP Class called RosterAPI that will parse the WoW Armory without XML Files. Unlike my previous two posts (Part 1 and Part 2), the information for each character can be pulled through get methods. Also included in RosterAPI are guild specific functions not included in my previous posts.
The following methods are currently included:
Character Specific:
* getLevel()
* getGender()
* getClass()
* getRace()
* getAchievementPoints()
* getProfessions(): Returns an associative array containing the name and value of each profession.
* getTalents(): Returns an associative array containing the name and value of each talent tree.
* getStat($stat): Please view the comment header of the getStat() function for a list of valid $stats.
Guild Specific:
* getGuildMembers($rank): If $rank is true, an associative array containing guild names and ranks will be returned. If $rank is false, an array will be returned containing all names in the guild.
* getTopWeeklyContributers(): Returns an array of the Top 5 Weekly Contributers in the guild.
* getGuildPerks(): Returns an array of the perks a guild currently has.
UPDATE:
I have received several emails with suggestions over the past week. In addition to everything listed above, my RosterAPI will also:
*getItems: Returns an Associative Array that will return every item equipped on a character along with the Item Level, Enchants, and Gems.
*getStatistics: Given a specific Statistic (ex: Number of deaths), the value of the statistic will be returned.
The code can be obtained via GitHub. While it is still a work in progress, it should be stable enough for personal use. This class is being used to power the backend of the We Know Roster. Please read the README file along with the example.php file for a brief introduction on how to use the class. I recommend reading the comments above each function in RosterAPI to understand what exactly will be returned (especially with those functions that return associative arrays).
Update #2
The Roster API now returns Glyphs for each character.
EDIT #2:
By request in the comments, here is a Paypal Donate button:

ScifiToday
January 19th, 2011 - 07:53
First off, I love the work you have put out so far. I see a lot of potential in it. I am however running into one major issue with special characters in character names. while trying to output the top contributers I have one character that has special characters in their name and it wont seem to display properly. Any ideas on how to fix this small issue?
January 20th, 2011 - 09:00
@gotsanity:
The issue should be fixed in the latest Git commit, if you pull the new file it should work.
If you would like to make the change without using the new file:
Add:
header(‘Content-Type: text/html; charset=UTF-8′); to the beginning of the file
wrap utf8_decode() around all occurances of ‘$charInfo->item(0)->nodeValue;’
Please let me know if you have any further issues.
January 22nd, 2011 - 13:42
You did a really awesome job with this. Is it possible you could show the code you used for the We Know roster?
January 31st, 2011 - 20:08
Thank you, for releasing the code for everyone!
I modded it to include item and gem IDs for easy tooltipping with wowhead. Trying to figure out a way to get enchantment IDs as well.
If you have a paypal account I’d be happy to buy you a beer or two!
February 8th, 2011 - 11:59
I second the need for a paypal account. I think my entire guild would buy you a round
February 8th, 2011 - 13:05
@roblibob and @gotsanity:
I have added a Paypal donate button to the bottom of the post.
Thanks!
March 4th, 2011 - 13:39
Is it possible to go in the detailed achievements, for example to get the information on Glory of something completion?
How would I do that? I can’t seem to find a full list of achievements for a particular character.
March 5th, 2011 - 20:26
Looks great, shame I dont have the knowledge to use it =(
All I would want is to show a list of lvl 85 guildies with equipped ilvl and their current talents (so you could determine their roles).
Could you help me with this in any way? I would be happy to make a small donation if I get this working
Thanks!