summaryrefslogtreecommitdiff
path: root/online/ingame/api/profile.logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'online/ingame/api/profile.logout.php')
-rw-r--r--online/ingame/api/profile.logout.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/online/ingame/api/profile.logout.php b/online/ingame/api/profile.logout.php
new file mode 100644
index 0000000..c3f2e88
--- /dev/null
+++ b/online/ingame/api/profile.logout.php
@@ -0,0 +1,15 @@
+<?php
+
+if (!isset($_GET["kartik_online_token"])) {
+ echo("false");
+ die();
+} else if (ctype_xdigit($_GET["kartik_online_token"]) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/online/private/gametokens/" . $_GET['kartik_online_token'])) {
+ $_DATA = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/online/private/gametokens/" . $_GET['kartik_online_token']), true);
+} else {
+ echo("false");
+ die();
+}
+
+echo("true");
+unlink($_SERVER['DOCUMENT_ROOT'] . "/online/private/gametokens/" . $_GET['kartik_online_token']);
+die(); \ No newline at end of file