手机版|小黑屋|SNW $ip = $_SERVER['REMOTE_ADDR']; $url = 'http://ip.taobao.com/service/getIpInfo.php?ip='.$ip; $content = file_get_contents($url); $data = json_decode($content, true); if($data['code'] === 0 && $data['data']['country_id'] === "CN") { // 是国内IP header('Location: http://www.3i5lz.com'); } else { // 是国外IP header('Location: http://www.315lz.com'); }
Powered by Discuz! X3.4 © 2001-2018 Comsenz Inc.