有道搜索和IP138的IP的API接口(PHP应用)
代码如下:
<?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: //www.jb51.net"); } ?>
相关推荐
seanzed 2020-10-15
夜影风个人空间 2020-09-22
LittleCoder 2020-09-11
studentxyh 2020-08-03
zhanglao 2020-06-26
playis 2020-06-16
playis 2020-06-16
hwm 2020-06-14
weibingbingnet 2020-06-14
seanzed 2020-06-14
zhanglao 2020-06-14
hotlinhao 2020-06-14
GearUpCloud 2020-06-13
playis 2020-06-10
coolhty 2020-06-09
playis 2020-05-29
XuDanT 2020-05-28
llltaotao 2020-05-19