(new \Gazelle\ReleaseType)->list(), 'Debug' => $Debug, ]); $appId = (int)$_GET['aid']; $token = $_GET['token']; $key = "api_applications_{$appId}"; $app = $Cache->get_value($key); if (!is_array($app)) { $app = $DB->rowAssoc(" SELECT Token, Name FROM api_applications WHERE ID = ? LIMIT 1 ", $appId ); if (is_null($app)) { json_error('invalid app'); } $Cache->cache_value($key, $app, 0); } if ($app['Token'] !== $token) { json_error('invalid token'); } $response = $api->run(); print(json_encode(['status' => 200, 'response' => $response], JSON_UNESCAPED_SLASHES));