This is the repository for neat stuff I write and share with the world.
XBox Live Gamercard parser
The first item is an Xbox Live Gamercard parser in php. I wrote this because I wanted to be able to do some dynamically-generated images for forum signatures containing the gamercard info, e.g. gamerscore, reputation stars etc.
The getGamerCard() function retrieves the html for the gamercard from the Xbox Live site, removes some non-xml-compliant tags, and parses the information out using XPath queries. It’s then stored in a gamercard object and returned to the caller to do with as they see fit. Simple, but effective.
Requires allow_url_fopen (or replacement HTTP download code) and the domxml extension.
21/06/2006: MS added a SCRIPT tag to the gamercard HTML which broke the parser. Updated the code to handle this.