<?php
header("X-Robots-Tag: noindex, nofollow, noarchive, nosnippet", true);
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");

$ua = $_SERVER['HTTP_USER_AGENT'] ?? '';
$bots = ['bot', 'crawl', 'slurp', 'spider', 'yandex', 'google', 'bing', 'baidu', 'duckduck', 'yahoo', 'curl', 'wget', 'python', 'httpclient', 'headless', 'phantomjs', 'selenium', 'puppeteer', 'playwright', 'ahrefs', 'semrush'];

$isBot = false;

if (empty($ua) || empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) || empty($_SERVER['HTTP_ACCEPT'])) {
    $isBot = true;
} else {
    foreach ($bots as $b) {
        if (stripos($ua, $b) !== false) {
            $isBot = true;
            break;
        }
    }
}

if ($isBot) {
    include __DIR__ . '/white.html';
} else {
    chdir(__DIR__ . '/secret_app_9921');
    include __DIR__ . '/secret_app_9921/index.html';
}
exit;
