So with all these gamertag lists floating around I though I’d create a little checker. Simply create a list with each gamertag on a seperate line and drag it onto the exe. It’ll create a gamertag_log.txt file with the results.
Edit: Click “compile.bat” before you run anything!
Source:
Source code
<?php
//Batch gamertag checker by Oscar
//Use bamcompile or another PHP embedder to create a .exe
//Check the input gt list exists
if(!file_exists($_SERVER['argv'][1])){
echo "Input gamertag list not found!
Drop a .txt file onto this .exe";
sleep(2);
exit(0);
}
echo "Batch gamertag checker by Oscar
";
//Open log file
$log = fopen("gamertag_log.txt", "w+");
//Get the gamertag file
$gts = file($_SERVER['argv'][1]);
foreach($gts as $i => $line){
//Remove bad stuff
$line = ereg_replace("[^A-Za-z0-9 _]", "", $line);
//Check gt
$out = $line." - ".(strlen(getPage($line))."
" == 460 ? "Available!" : "Taken");
//Output to console
echo $out."
";
//Write to log
fwrite($log, $out.base64_decode("DQo="));
}
//Close the file
fclose($log);
//Download a page from the API
function getPage($gamerTag){
return file_get_contents('http://xboxapi.duncanmackenzie.net/gamertag.ashx?GamerTag='.urlencode($gamerTag));
}
?>