Home  >  Article  >  php教程  >  最新版IP定位 纯真数据库(2015.04.25)更新库

最新版IP定位 纯真数据库(2015.04.25)更新库

WBOY
WBOYOriginal
2016-06-07 11:38:471135browse

纯真数据库
        $ip=get_client_ip(0,true); //获取客户端IP地址(TP方法)<br>     $IpIpLocation = new \Org\Net\IpLocation('data.dat'); // 实例化类 参数表示IP地址库文件<br>         <br>     $area = $IpLocation->getlocation($ip); // 获取某个IP地址所在的位置<br>     $str=$area['country'].$area['area']; //合并位置    <br>     $str=iconv("GB2312", "UTF-8",$str); //因为最新版为GBK 转为UTF8<br>        dump($str);  //输出地址

附件 qqwry.zip ( 4.62 MB 下载:283 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn