PHPackages                             joql/zx-ip-address - 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. joql/zx-ip-address

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

joql/zx-ip-address
==================

兼容php5.6。原项目：ritaswc/zx-ip-address

3.0.0(5y ago)021MITPHPPHP &gt;=5.6

Since Mar 3Pushed 5y agoCompare

[ Source](https://github.com/joql/zx-ip-address)[ Packagist](https://packagist.org/packages/joql/zx-ip-address)[ Fund](https://blog.yinghualuo.cn/blog/2020/11/sponsor.png)[ RSS](/packages/joql-zx-ip-address/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (52)Used By (0)

[![FOSSA Status](https://camo.githubusercontent.com/d7b07a1eb4f9154bccff865d9dbcddd1277f22b23a97f8f7c96a9720c2c1fafb/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246726974617377632532467a782d69702d616464726573732e7376673f747970653d736869656c64)](https://app.fossa.com/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address?ref=badge_shield)[![Build Status](https://camo.githubusercontent.com/bb2307e5e6a51f3564de196ae86dfada7a2f9bf4a6ae2ca3a00dbe7ebf23ffeb/68747470733a2f2f7777772e7472617669732d63692e6f72672f726974617377632f7a782d69702d616464726573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/github/ritaswc/zx-ip-address)[![Total Downloads](https://camo.githubusercontent.com/ce23b9995797dfb6df38e2c24fcdc60964beb7794cbd9339e270ce08f862703d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726974617377632f7a782d69702d61646472657373)](https://packagist.org/packages/ritaswc/zx-ip-address)[![Latest Stable Version](https://camo.githubusercontent.com/0725369890131c51ca27193f67cd7b8eb9f38ac5bfbe8e9e1773bec5c453d1d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726974617377632f7a782d69702d61646472657373)](https://packagist.org/packages/ritaswc/zx-ip-address)[![License](https://camo.githubusercontent.com/b5903c9dbe4f9106a0637871ad602786047cde3c35051878d88f194b5573810c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726974617377632f7a782d69702d61646472657373)](https://packagist.org/packages/ritaswc/zx-ip-address)[![PHP Version >= 5.6](https://camo.githubusercontent.com/86e7d829a466cacd5658a22073e27d49d39dac72cc18216ac4963ed5463c5bbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://www.php.net)

IPv4/IPv6 offline address database.IPv4/IPv6双栈地址离线数据库。IPv4 by 纯真网络，IPv6 by ZX Inc.
----------------------------------------------------------------------------------

[](#ipv4ipv6-offline-address-databaseipv4ipv6双栈地址离线数据库ipv4-by-纯真网络ipv6-by-zx-inc)

##### Being updating every 5 days 每5天更新一次

[](#being-updating-every-5-days-每5天更新一次)

### IPv4 address locations by 纯真网络

[](#ipv4-address-locations-by-纯真网络)

database updated at 2021-03-10 with 528627 records

### IPv6 address locations by Zx Inc.

[](#ipv6-address-locations-by-zx-inc)

database updated at 2020-05-06 with 141389 records

### Usage/使用方法

[](#usage使用方法)

```
composer require ritaswc/zx-ip-address
```

Your code/你的业务代码

```
$result = \Ritaswc\ZxIPAddress\IPTool::query('8.8.8.8');
/*
$result = [
    "start" => "8.8.8.8"
    "end" => "8.8.8.8"
    "addr" => array:2 [
        0 => "美国"
        1 => "加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器"
    ]
    "disp" => "美国 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器"
]
 */
$result = \Ritaswc\ZxIPAddress\IPTool::query('240e:e9:8819:0:3::3f9');
/*
$result = [
    "start" => "240e:e9:8800::"
    "end" => "240e:e9:8fff:ffff::"
    "addr" => array:2 [
        0 => "中国江苏省苏州市"
        1 => "中国电信IDC"
    ]
    "disp" => "中国江苏省苏州市 中国电信IDC"
]
 */
$valid = \Ritaswc\ZxIPAddress\IPv4Tool::isValidAddress('114.114.114.114');
/*
$valid = true;
 */
$valid = \Ritaswc\ZxIPAddress\IPv6Tool::isValidAddress('240e:e9:8819:0:3::3f9');
/*
$valid = true;
 */
```

### Notice/使用提示

[](#notice使用提示)

- We don't recommend forking this repository/不推荐fork此仓库
- We recommend using linux's crontab to update ip database/推荐使用linux计划任务定期更新数据库

### Auto update database/自动更新数据库

[](#auto-update-database自动更新数据库)

```
crontab -e
# add line/增加一行，每小时更新一次
0 * * * * * cd /var/www/your_project && composer require ritaswc/zx-ip-address
```

### Official Website/官方网站

[](#official-website官方网站)

- [纯真IPv4数据库](https://www.cz88.net/)
- [IPv6地址查询工具 Tokyo Japan](http://ip.zxinc.org)
- [IPv6地址查询工具 Ningbo China](https://ip.shanshan-business.com)
- [IPv6地址查询工具 Beijing China](https://ip.yinghualuo.cn)

### Author Blog/作者博客

[](#author-blog作者博客)

- [Charles的小星球](https://blog.yinghualuo.cn)

### QQ Group/QQ交流群

[](#qq-groupqq交流群)

- ZX IPv6地址库交流群 23871048

### Sponsor/赞助

[](#sponsor赞助)

[![QrCode](https://camo.githubusercontent.com/2feecdc6c38e688236f6833db15feb341f37876ea120e86e756845226b9d15d2/68747470733a2f2f626c6f672e79696e676875616c756f2e636e2f626c6f672f323032302f31312f73706f6e736f722e706e67)](https://camo.githubusercontent.com/2feecdc6c38e688236f6833db15feb341f37876ea120e86e756845226b9d15d2/68747470733a2f2f626c6f672e79696e676875616c756f2e636e2f626c6f672f323032302f31312f73706f6e736f722e706e67)

### License/使用协议

[](#license使用协议)

ZxIpAddress is licensed under [MIT](https://github.com/ritaswc/zx_ip_address/blob/master/LICENSE).

[![FOSSA Status](https://camo.githubusercontent.com/f55bc1cb97fdf0f832b1ad7f6391ea8a4384772c175edd4029372f9fafa4b936/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246726974617377632532467a782d69702d616464726573732e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address?ref=badge_large)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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 ~7 days

Total

50

Last Release

1882d ago

Major Versions

1.1.1 → 2.0.02020-05-07

2.0.41 → 3.0.02021-03-17

PHP version history (3 changes)1.0.0PHP ^7.0

2.0.34PHP &gt;=7.0

3.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/fae7007ef39a09d4adb89f12a8a81c7276f0c5eb3346dafb82b47bd60031534d?d=identicon)[Joql](/maintainers/Joql)

---

Top Contributors

[![ritaswc](https://avatars.githubusercontent.com/u/15887140?v=4)](https://github.com/ritaswc "ritaswc (84 commits)")[![joql](https://avatars.githubusercontent.com/u/26376957?v=4)](https://github.com/joql "joql (3 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

### Embed Badge

![Health badge](/badges/joql-zx-ip-address/health.svg)

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

###  Alternatives

[jackiedo/dotenv-editor

The .env file editor tool for Laravel 5.8+

2041.2M31](/packages/jackiedo-dotenv-editor)[johnbillion/wp-crontrol

Take control of the cron events on your WordPress website or WooCommerce store

22381.4k1](/packages/johnbillion-wp-crontrol)

PHPackages © 2026

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