Revvv
Getting There
Just whipped up this code:
You can expand upon what I have given you. At the moment that will print out:
Gamertag
Gamerscore
Motto
Bio
Reputation
Enjoy.
PHP:
<?PHP
function getGamertagSource($gamertag)
{
$dom = new DOMDocument("1.0", "utf-8");
$dom->loadHTMLFile("http://gamercard.xbox.com/en-US/".str_replace(" ", "%20", $gamertag).".card");
$xpath = new DomXpath($dom);
return array('Gamertag' => $dom->getElementById('Gamertag')->textContent,'gamerscore' => $dom->getElementById('Gamerscore')->textContent, 'motto' => $dom->getElementById('Motto')->textContent, 'bio' => $dom->getElementById('Bio')->textContent, 'Reputation' => $xpath->query("//*[contains(concat(' ', normalize-space([USER=460461]class[/USER]), ' '), ' Star Full ')]")->length."*");
}
$gamertag = getGamertagSource("major nelson");
foreach($gamertag as $item => $value){
echo $item.": ".$value."<br>";
}
?>
You can expand upon what I have given you. At the moment that will print out:
Gamertag
Gamerscore
Motto
Bio
Reputation
Enjoy.