aboutsummaryrefslogtreecommitdiffstats
path: root/ami4get.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-08-11 01:55:15 +0000
committerlolcat <will@lolcat.ca>2025-08-11 01:55:15 +0000
commitcdf958d29333d448f4521f4d2faa2592b58e9b27 (patch)
tree528f2a0ffa789a6f4279d9f54a4a2aaf391f390f /ami4get.php
downloadshittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.tar.gz
shittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.tar.bz2
shittyweb-search-cdf958d29333d448f4521f4d2faa2592b58e9b27.zip
fix wikipedia crashgrafted
Diffstat (limited to 'ami4get.php')
-rw-r--r--ami4get.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/ami4get.php b/ami4get.php
new file mode 100644
index 0000000..5bb9273
--- /dev/null
+++ b/ami4get.php
@@ -0,0 +1,27 @@
+<?php
+
+header("Content-Type: application/json");
+header("Access-Control-Allow-Origin: *");
+
+include "data/config.php";
+
+$real_requests = apcu_fetch("real_requests");
+$bot_requests = apcu_fetch("captcha_gen");
+
+echo json_encode(
+ [
+ "status" => "ok",
+ "service" => "4get",
+ "server" => [
+ "name" => config::SERVER_NAME,
+ "description" => config::SERVER_LONG_DESCRIPTION,
+ "bot_protection" => config::BOT_PROTECTION,
+ "real_requests" => $real_requests === false ? 0 : $real_requests,
+ "bot_requests" => $bot_requests === false ? 0 : $bot_requests,
+ "api_enabled" => config::API_ENABLED,
+ "alt_addresses" => config::ALT_ADDRESSES,
+ "version" => config::VERSION
+ ],
+ "instances" => config::INSTANCES
+ ]
+);