<?php
/*
Xbox Live Gamertag Checker
Written by Sedulous
*/
if ($argc < 2)
{
print "Usage: php $argv[0] <input file> <output file>\n";
exit;
}
$input_fd = fopen($argv[1], 'r');
$output_fd = fopen($argv[2], 'w');
while (!feof($input_fd))
{
$current_gamertag = fread($input_fd, filesize($input_fd));
$current_test_page = file_get_contents("https://live.xbox.com/en-US/Profile?gamertag=" + $current_gamertag);
if (strpos($current_test_page, "Ooops! What happened to this page?" !== false))
{
fwrite($output_fd, $current_gamertag, strlen($current_gamertag));
{
}
fclose($input_fd);
fclose($output_fd);
?>
This script is meant to be ran in the command-line/terminal for various reasons.
Whenever I try to run it, I get the following error:
"PHP Parse error: syntax error, unexpected end of file in /home/jared/Desktop/gamertag_checker.php on line 31"
I don't see any errors, does anyone know how to fix this?