You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once __DIR__."/Tracker.php";
|
|
|
|
|
|
|
|
if (php_sapi_name() == 'cli') {
|
|
|
|
if (isset($argv[1])) {
|
|
|
|
parse_str($argv[1], $_GET);
|
|
|
|
}
|
|
|
|
if (isset($argv[2])) {
|
|
|
|
parse_str($argv[2], $_POST);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isset($_POST["adminKey"]) || $_POST["adminKey"] != $_ENV["ADMIN_KEY"]){
|
|
|
|
echo "Forbidden";
|
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
|
|
|
$tracker = new Tracker();
|
|
|
|
if (!$tracker->add($_POST["gameName"], $_POST["tagLine"], $message)){
|
|
|
|
echo "Failure: ".$message;
|
|
|
|
}
|