PHPackages                             dy7338/ip2region - 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. dy7338/ip2region

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

dy7338/ip2region
================

基于ip2region的查询库

05PHP

Since Sep 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dy7338/ip2region)[ Packagist](https://packagist.org/packages/dy7338/ip2region)[ RSS](/packages/dy7338-ip2region/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

本composer包基于 `ip2region` ，一切版权归原作者所有

ip2region - 最自由的ip地址查询库，ip到地区的映射库，提供Binary,B树和纯内存三种查询算法，妈妈再也不用担心我的ip地址定位。

### 1. 99.9%准确率，定时更新：

[](#1-999准确率定时更新)

数据聚合了一些知名ip到地名查询提供商的数据，这些是他们官方的的准确率，经测试着实比纯真啥的准确多了。
每次聚合一下数据需要1-2天，会不定时更新。

### 2. 标准化的数据格式：

[](#2-标准化的数据格式)

每条ip数据段都固定了格式： *城市Id|国家|区域|省份|城市|ISP*

只有中国的数据精确到了城市，其他国家只能定位到国家，后前的选项全部是0，已经包含了全部你能查到的大大小小的国家。

### 3. 体积小：

[](#3-体积小)

生成的数据库文件ip2region.db只有1.5M（1.2版本前是3.5M）

### 4. 多查询客户端的支持，0.0x毫秒级别的查询

[](#4-多查询客户端的支持00x毫秒级别的查询)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![dy7338](https://avatars.githubusercontent.com/u/11937933?v=4)](https://github.com/dy7338 "dy7338 (1 commits)")

### Embed Badge

![Health badge](/badges/dy7338-ip2region/health.svg)

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

###  Alternatives

[xsuchy09/utm-cookie

Utm-Cookie saves utm parameters from url into cookie with defined lifetime (default 7 days). Than cookie (utm) can be used later without parsing google or any other cookies.

1557.8k2](/packages/xsuchy09-utm-cookie)[renoki-co/clusteer

Clusteer is a Puppeteer wrapper written for PHP, with the super-power of parallelizing pages across multiple browser instances.

891.2k](/packages/renoki-co-clusteer)

PHPackages © 2026

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