Plain version of XBOX Last Seen Widget
<?php
$user = 'rentedsmile';
$url = 'http://gamercard.xbox.com/en-US/' . rawurlencode($user) . '.card';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$output = curl_exec($ch);
curl_close($ch);
$html = new DOMDocument;
$html->loadHTML($output);
$list = $html->getElementById('PlayedGames');
$imge = $list->getElementsByTagName('img')->item(0)->getAttribute('src');
$name = $list->getElementsByTagName('span')->item(0)->nodeValue;
$date = strtotime($list->getElementsByTagName('span')->item(1)->nodeValue);
$time = (date('dmy',$date)==date('dmy')) ? 'earlier today' : ((date('dmy',$date)==date('dmy',strtotime('yesterday'))) ? 'yesterday' : floor((time()-$date)/86400) . ' days ago');
echo '<img src="' . $imge . '" /><a href="http://live.xbox.com/en-US/MyXbox/Profile?Gamertag=' . $user . '">' . $user . '</a> - Last seen ' . $time . ' playing ' . $name;