検索とIP 138のIPのAPIインターフェース(PHPアプリケーション)があります。

546 ワード

 
  
$myip = $_SERVER["REMOTE_ADDR"];
//ip138 http://wap.ip138.com/ip.asp?ip=www.myolnet.com
//youdao http://www.youdao.com/smartresult-xml/search.s?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: //www.jb51.net");
}
?>