summaryrefslogtreecommitdiff
path: root/ami4get.php
blob: 5bb92732de68cb566bd81e6efe67c8b5d0568f54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
	]
);