PHPackages                             zqhong/ip-location-zh - 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. zqhong/ip-location-zh

ActiveLibrary

zqhong/ip-location-zh
=====================

get the ip's location info with Chinese

v2.5.3(4y ago)024MITPHPCI failing

Since Sep 12Pushed 3mo agoCompare

[ Source](https://github.com/zqhong/ip-location-zh)[ Packagist](https://packagist.org/packages/zqhong/ip-location-zh)[ RSS](/packages/zqhong-ip-location-zh/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (1)Versions (35)Used By (0)

Ip Location Zh
==============

[](#ip-location-zh)

`ipipfree.ipdb` 数据库最后更新时间为 2019-7-3, 更新时间:不定期。 数据源于: 备注：截止到 2026 年 1 月 29 日，`ipipfree.ipdb` 数据库最后更新时间为 2019-7-3。

`qqwry.dat` 更新到 20260128 版本。数据库来自：[metowolf/qqwry.dat](https://github.com/metowolf/qqwry.dat)

安装
--

[](#安装)

```
composer require -vvv zqhong/ip-location-zh
```

测试
--

[](#测试)

```
./vendor/bin/phpunit ./tests/*.php
```

使用
--

[](#使用)

```
use Zhuzhichao\IpLocationZh\Ip;

$ipInfo = Ip::findV2("47.96.140.2");

printf("%s%s%s（%s）",
    $ipInfo->getCountry(),
    $ipInfo->getProvince(),
    $ipInfo->getCity(),
    $ipInfo->getIsp()
);

// 返回结果：中国 浙江 杭州（阿里云）
// 具体代码请参考：examples.php
```

与原仓库的区别
-------

[](#与原仓库的区别)

1. 添加 findV2 方法，返回 IpInfo 对象，提供更方便使用的结果
2. 添加运营商（ISP）数据

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

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

Recently: every ~237 days

Total

34

Last Release

1512d ago

Major Versions

v1.9.1 → v2.02016-04-29

v1.9.3 → 2.2.02017-01-09

v1.9.4 → 2.2.12017-01-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/07b89d7dffb1cade7cc94991657209f8d8c51be863b4403f9d352b5cd6b27c47?d=identicon)[zqhong](/maintainers/zqhong)

---

Top Contributors

[![zhichao-poper](https://avatars.githubusercontent.com/u/141097055?v=4)](https://github.com/zhichao-poper "zhichao-poper (66 commits)")[![zqhong](https://avatars.githubusercontent.com/u/8402647?v=4)](https://github.com/zqhong "zqhong (19 commits)")[![iflamed](https://avatars.githubusercontent.com/u/1819687?v=4)](https://github.com/iflamed "iflamed (3 commits)")[![douyux](https://avatars.githubusercontent.com/u/12441728?v=4)](https://github.com/douyux "douyux (1 commits)")[![kwaziidev](https://avatars.githubusercontent.com/u/1195510?v=4)](https://github.com/kwaziidev "kwaziidev (1 commits)")

---

Tags

IPlocationChinese

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zqhong-ip-location-zh/health.svg)

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

###  Alternatives

[itbdw/ip-database

IP数据库 IPV4 IPV6（解析为国家、省、市、县、运营商）

1.5k123.8k7](/packages/itbdw-ip-database)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[zoujingli/ip2region

ip2region v3.0 for PHP - 企业级 IP 地理位置查询库，支持 IPv4 和 IPv6，多种缓存策略，零依赖，开箱即用

1.4k437.1k56](/packages/zoujingli-ip2region)[gai871013/ip-location

纯真IP地址,composer包(解析QQWay.dat)

729.7k4](/packages/gai871013-ip-location)[kartik-v/yii2-ipinfo

An IP address information display widget for Yii 2.0 with country flag and geo position info.

2832.6k1](/packages/kartik-v-yii2-ipinfo)

PHPackages © 2026

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