From 21ed7d0e837d74c1ebd8ada4396f96ce42c14fb1 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 13 May 2023 19:25:44 +0200 Subject: Updated 14 files and added 6 files (automated) --- pages/api/session.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/api/session.php (limited to 'pages/api/session.php') diff --git a/pages/api/session.php b/pages/api/session.php new file mode 100644 index 0000000..f91288e --- /dev/null +++ b/pages/api/session.php @@ -0,0 +1,24 @@ + null, + "created" => null, + "last_seen" => null, + "seen_at" => null + ], JSON_PRETTY_PRINT)); +} + +$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])), true); + +die(json_encode([ + "name" => $data["name"], + "created" => date('c', $data["created"]), + "last_seen" => date('c', $data["last"]), + "seen_at" => array_keys($data["addresses"]) +], JSON_PRETTY_PRINT)); \ No newline at end of file -- cgit