Home > php教程 > PHP源码 > body text

PHP查询ip所在地(省份,市)

WBOY
Release: 2016-06-08 17:22:55
Original
3130 people have browsed it

文章介绍利用相关api接口实现根据客户端IP地址获得所属城市地区一个php实例,下面我们一起来看看。

<script>ec(2);</script>

今天分享一个PHP根据客户端IP地址获得所属地的小程序,以前写的,已经用了很久了,感觉这个接口还是停稳定的。虽然现在网上也有很多类似的,但是我觉得我这个还是很不错的,核心代码只用3行就能实现。虽然功能不是很强大,但是我们平时算是够用的。以下是代码:

 

 代码如下 复制代码

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template