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

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

eddy/ip2region
==============

php client for ip2region

v1.0(7y ago)123MITPHPPHP &gt;=5.6

Since Apr 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/eddy8/ip2region)[ Packagist](https://packagist.org/packages/eddy/ip2region)[ RSS](/packages/eddy-ip2region/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

ip2region 的 PHP 客户端
===================

[](#ip2region-的-php-客户端)

说明
--

[](#说明)

库文件`ip2region.db`生成参考：[ip2region](https://github.com/lionsoul2014/ip2region)

安装
--

[](#安装)

```
composer require eddy/ip2region

```

使用方法
----

[](#使用方法)

```
//在本项目的 src/data 目录下已经生成好了一份 ip2region.db 文件，可以复制到你的项目直接使用。当然你也可以自己生成一份最新的文件。
$ip2region_db_file_location = 'ip2region.db';
$client = new eddy\Ip($ip2region_db_file_location);
$data = $client->memorySearch('220.168.85.64');
print_r($data);
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2639d ago

### Community

Maintainers

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

---

Top Contributors

[![eddy8](https://avatars.githubusercontent.com/u/2555476?v=4)](https://github.com/eddy8 "eddy8 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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