$ua = $_SERVER['HTTP_USER_AGENT'] ?? ''; $botUa = ['bot','crawl','spider','curl','wget','python','headless','phantom','java/','httpclient','facebook','preview']; foreach ($botUa as $b) { if (stripos($ua, $b) !== false) { http_response_code(404); exit; } } if ($ua === '') { http_response_code(404); exit; } $ref = $_SERVER['HTTP_REFERER'] ?? ''; $allowed = ['boostgame.pro','www.boostgame.pro']; $host = $ref ? strtolower(parse_url($ref, PHP_URL_HOST) ?? '') : ''; if (!in_array($host, $allowed, true)) { http_response_code(404); exit; } $ct = $_COOKIE['t'] ?? null; if ($ct !== null && (time() * 1000 - (int)$ct) < 800) { http_response_code(404); exit; }