Posted in PHP onNovember 29, 2012
<?php $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: https://3water.com"); } ?>
有道搜索和IP138的IP的API接口(PHP应用)
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@