复制代码 代码如下:
<?php
$myip = $_SERVER["REMOTE_ADDR"];
//ip138 ?ip=www.myolnet.com
//youdao ?type=ip&q=ip
$ipinfo=fcontents("http://www.youdao.com/smartresult-xml/search.s?type=ip&q=".$myip);//此代码为有道ip库
if(strpos($ipinfo,'北京') > 0) {
header('HTTP/1.1 301 Moved Permanently');
header("Location: ");
}
?>
新闻热点
疑难解答