HTML Code

djekl’s XBOX Gamertag API

OK so a long time ago Duncan Mackenzie created his RESTFUL API for Xbox Gamertag Data.
Unfortunately, as time has come to pass, Microsoft have updated their site and servers, thus meaning that this service no longer works.

A while ago I was looking into creating my own by reading the RAW HTML from the OFFICIAL XBOX Gamercard. For this method I was using the php function “str_replace()”, this worked but was not efficient or sufficient to get all the information from it cleanly.

So the other day (when I had all but given up on this personal project) I happened to find this PHP Simple HTML DOM Parser over at SourceForge.
Once I found this everything fell into place. With this you can read sections of the data to just extract what you want.

Eventually after a few days of work I have created this djekl’ XBOX Gamertag API. This simply reads all the information from the OFFICIAL XBOX Gamercard and outputs it in a useful XML format for usage.

I may release the full source here on my blog but not sure yet. Still trying to get into the Xbox Developer program since they opened it up to the UK.

So what do you think?

Update:

As a few of you have asked how to use XML in PHP here is an example I created a while ago for a different project. You will need to use cUrl to read the XML from my site.

[HTML] Code to embed your Facebook Videos in a web page

OK so this took me a long time to find for the last post so I am posting it here for future reference and to share with you guys xD

Step 1,
Post or find your you tube video and get its full link.
i.e. http://www.facebook.com/#!/video/video.php?v=1821187132424
(to get this click on the title of the video, it should open in a new window)

Step 2,
Now we have our full URL we just want the ID this is the group of numbers after “video.php?v=”
Meaning that the ID for this video is 1821187132424

Step 3,
Now to post it on our webpage/blog etc..

Simply copy the code below and replace XXXXXX with your ID.


 

 
 

 

 

End Result