From 9b2f05228357a34a3c0f2950782835dfeb35086e Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 25 Jan 2023 21:29:24 +0100 Subject: Updated 3 files and added 2 files (automated) --- api/booru-check.php | 24 ++++++++++++++++++++++++ api/booru.php | 8 ++++++++ api/raindrops-img.php | 3 ++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 api/booru-check.php create mode 100644 api/booru.php (limited to 'api') diff --git a/api/booru-check.php b/api/booru-check.php new file mode 100644 index 0000000..b2a3800 --- /dev/null +++ b/api/booru-check.php @@ -0,0 +1,24 @@ + false, + "user" => null +]; + +if (isset($_GET["key"])) { + if (in_array($_GET["key"], $list)) { + $obj["valid"] = true; + + foreach (array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens"), function ($i) { return !str_starts_with($i, "."); }) as $token) { + $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $token), true); + $obj["user"] = $data["login"]; + } + } +} + +die(json_encode($obj)); \ No newline at end of file diff --git a/api/booru.php b/api/booru.php new file mode 100644 index 0000000..3c3c1d0 --- /dev/null +++ b/api/booru.php @@ -0,0 +1,8 @@ +