PHPackages                             liguangchun/ip - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. liguangchun/ip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

liguangchun/ip
==============

IP数据库，支持纯真数据库、百度腾讯高德地图等平台

v1.1.10(6y ago)1187MITPHPPHP &gt;=7.0

Since Feb 22Pushed 6y agoCompare

[ Source](https://github.com/GC0202/ip)[ Packagist](https://packagist.org/packages/liguangchun/ip)[ Docs](https://www.dtapp.net)[ RSS](/packages/liguangchun-ip/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (1)Versions (22)Used By (0)

[![dtApp Logo](https://camo.githubusercontent.com/e858adb379e4fd8e72b8b1f6c1865bbb2b87a48b975533e619b678f8ac861f8c/68747470733a2f2f63646e2e6f73732e6c696775616e676368756e2e636e2f30342f3939396539663266303664333936393638656163633130636539626338612e706e67)](https://camo.githubusercontent.com/e858adb379e4fd8e72b8b1f6c1865bbb2b87a48b975533e619b678f8ac861f8c/68747470733a2f2f63646e2e6f73732e6c696775616e676368756e2e636e2f30342f3939396539663266303664333936393638656163633130636539626338612e706e67)

[IP数据库](https://www.dtapp.net/)
===============================

[](#ip数据库)

📦 IP数据库 PHP扩展包

[![Latest Stable Version](https://camo.githubusercontent.com/51bcf2fcd53c34ab3909f0ae54b443e3b25a9ed993575b561eb075cd5beca369/68747470733a2f2f706f7365722e707567782e6f72672f6c696775616e676368756e2f69702f762f737461626c65)](https://packagist.org/packages/liguangchun/ip)[![Latest Unstable Version](https://camo.githubusercontent.com/a479ec62cd5d8e9c2712bbadf18ae17878ac70d341e1dbfec6102dc2da81b301/68747470733a2f2f706f7365722e707567782e6f72672f6c696775616e676368756e2f69702f762f756e737461626c65)](https://packagist.org/packages/liguangchun/ip)[![Total Downloads](https://camo.githubusercontent.com/42983e33669f734308295adbcb0736f0fccada04a4b9ef771f03121550dbd38e/68747470733a2f2f706f7365722e707567782e6f72672f6c696775616e676368756e2f69702f646f776e6c6f616473)](https://packagist.org/packages/liguangchun/ip)[![License](https://camo.githubusercontent.com/0466b5d7a90fa96a9a393fcf8c416b7bf7058ade7a9077922f2ad152496c3742/68747470733a2f2f706f7365722e707567782e6f72672f6c696775616e676368756e2f69702f6c6963656e7365)](https://packagist.org/packages/liguangchun/ip)[![PHP Version](https://camo.githubusercontent.com/21223b9ffedc1feec4026ec59947bafeec1e45b69a0e2fd1383975636e8d09a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e302d3838393242462e737667)](https://packagist.org/packages/GC0202/ip)[![Dependency Status](https://camo.githubusercontent.com/bdc3b1a4ba8e1c17e0e12ba09728b44c4de5d1ac91bcece215b973d8e1e1a5d3/68747470733a2f2f64617669642d646d2e6f72672f4743303230322f69702e737667)](https://david-dm.org/GC0202/ip)[![Dependency Status Dev](https://camo.githubusercontent.com/701c7233c228320341f7a25e8700271461360f0ef84e25533036f8d64bd10ce3/68747470733a2f2f64617669642d646d2e6f72672f4743303230322f69702f6465762d7374617475732e737667)](https://david-dm.org/GC0202/ip?type=dev)[![GitHub last commit](https://camo.githubusercontent.com/06e5f541b982959d37e57eecc982ccb25388d57384cf3b9c4f6c70536bd54a98/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f4743303230322f69703f6c6f676f3d676974687562)](https://github.com/GC0202/ip/commits)[![GitHub commit activity](https://camo.githubusercontent.com/94a0058755ded715432d26267f8923b1bc81c4c921684f94ced108e5066b4813/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f4743303230322f6970)](https://github.com/GC0202/ip/commits)[![GitHub contributors](https://camo.githubusercontent.com/59f60aa7d6ee02c543772f41e3e7ced613d09b86bce6bf2be271dca9afbb7e2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4743303230322f69703f6c6f676f3d676974687562266c6162656c3d646576656c6f70657273)](https://github.com/GC0202/ip/graphs/contributors)

依赖环境
----

[](#依赖环境)

1. PHP7.0 版本及以上（低版本和7.4版本未做兼容处理！）

数据源
---

[](#数据源)

- datav

支持库
---

[](#支持库)

- 纯真数据库
- 高德地图
- 淘宝
- 百度搜索
- 腾讯地图
- 太平洋
- 搜狐
- 好搜
- 新浪
- IP Geolocation
- extreme-ip
- ipip
- 网易
- 哔哩哔哩
- 阿里云

应用示例
----

[](#应用示例)

- [数据应用](https://www.dtapp.net/ "数据应用")
- [数据分析](https://data.dtapp.net/ "数据分析")
- [数据工具](https://tool.dtapp.net/ "数据工具")
- [新型冠状病毒肺炎](https://data.dtapp.net/pneumonia/index.html "新型冠状病毒肺炎")
- [广东省建设项目数据](https://data.dtapp.net/gdbuild/index.html "广东省建设项目数据")

使用文档
----

[](#使用文档)

[文档链接](https://apidoc.dtapp.net/web/#/8 "文档链接")

计划支持
----

[](#计划支持)

- 纯真数据库运营商优化
- 获取省份、城市、地区信息列表

纯真数据库返回类型
---------

[](#纯真数据库返回类型)

```
{
	"location_all": "广东省广州市",
	"isp": {
		"name": "广东互联网络交换中心(越秀区东风路305号)"
	},
	"ip": {
		"ipv4": "210.76.74.180",
		"beginip": "210.76.64.0",
		"endip": "210.76.95.255",
		"trueip": 3528215220,
		"ipv6": "0000:0000:0000:0000:0000:ffff:d24c:4ab4"
	},
	"province": {
		"name": "广东省",
		"adcode": "440000",
		"lat": 23.125178,
		"lng": 113.280637
	},
	"city": {
		"name": "广州市",
		"adcode": "440100",
		"lat": 23.125178,
		"lng": 113.280637
	},
	"district": {
		"name": "未知",
		"adcode": "",
		"lat": "",
		"lng": ""
	}
}
```

安装
--

[](#安装)

```
composer require liguangchun/ip -vvv

```

更新
--

[](#更新)

```
composer update liguangchun/ip -vvv

```

删除
--

[](#删除)

```
composer remove liguangchun/ip -vvv

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

21

Last Release

2229d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19975474?v=4)[liguangchun](/maintainers/liguangchun)[@liguangchun](https://github.com/liguangchun)

---

Top Contributors

[![dtapps](https://avatars.githubusercontent.com/u/16093106?v=4)](https://github.com/dtapps "dtapps (27 commits)")

---

Tags

IPliguangchun

### Embed Badge

![Health badge](/badges/liguangchun-ip/health.svg)

```
[![Health](https://phpackages.com/badges/liguangchun-ip/health.svg)](https://phpackages.com/packages/liguangchun-ip)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.2M24](/packages/s1lentium-iptools)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

180738.8k11](/packages/rlanvin-php-ip)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147245.6k6](/packages/longman-ip-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
