3

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

AndrewFerrara
  • 2,383
  • 8
  • 30
  • 45

4 Answers4

3

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.

sberry
  • 128,281
  • 18
  • 138
  • 165
  • This does not work, you must use a method that can utilize JS as MS' login forms requires it. You can steal your RPSAuth cookie from your browser and use that but that's just a dirty session hijack method that'll only keep you logged in for up to 12 hours after which you need a new cookie. – Jamie Taniguchi May 17 '11 at 22:40
2

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.

Cpt Cosmo
  • 21
  • 1
0

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]);
0

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

seagulf
  • 380
  • 3
  • 5