scraping Xbox Live member current activity

2.3k views Asked by At

I'm looking into how to get a Xbox Live member's presence (i.e. Not Online, Online playing _).

The only way is to be signed into Xbox.com, visit the player's page, and scrape some text from a div. http://live.xbox.com:80/en-US/MyXbox/Profile?gamertag=example Seen here

<div id="CurrentActivity">
     Call of Duty Black Ops - In Combat Training on Summit
</div>

Is there a way to sign into http://xbox.com with a script or otherwise find a player's current status?

EDIT: Here is my project Xbox Messenger / Status

4

There are 4 answers

1
sberry On BEST ANSWER

You cab use curl in PHP. You will need to store the cookies and reuse your cookie file with subsequent requests.

Another scripting option is to use mechanize. There isn't a PHP library last I checked, but there is one for Python, perl and Ruby.

0
seagulf On

You can record a robot using IRobotSoft web scraper if you just need an easy solution.

0
Cpt Cosmo On

http://live.xbox.com/en-US/Profile?Gamertag=GAMERTAG

here u can find the players Xbox Live online Status without being logged in to the site. Scrape it with any method you find over the web.

0
Andrew Cave On

This is code that i just made this will work

$opentag='<div class="presence">';
$closetag='</div>';
$url=file_get_contents('http://live.xbox.com/en-US/Profile?gamertag=major%20nelson')


$presence=explode($opentag, $url);
$presence=explode($closetag, $presence[1]);

echo trim($presence[0]);