根据IP跳转不同URL
网易接口失效, 换太平洋电脑网ip库或ip-api库 根据不同地区用户跳转分站 怎么修改
底部附上可用的ip库地址。
<!DOCTYPEhtml>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="keywords"content=""/>
<meta name="description"content=""/>
<script src="http://ip.ws.126.net/ipquery"></script>
<script type="text/javascript">
// 情况一限定地区跳转
if(lc=="北京市" || lc=="上海市")
{document.location.href="http://so.com";}
// 情况二限定地区跳转
else if(lc=="广州市" || lc=="梅州市")
{document.location.href="http://baidu.com";}
// 非上述地区
else
{document.location.href="http://sohu.com";}
</script>
</body>
太平洋电脑网ip库接口地址:http://whois.pconline.com.cn/
ip-api库地址:http://ip-api.com/json/?lang=zh-CN