PHPackages                             qingbing/pf-tools-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. qingbing/pf-tools-ip

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

qingbing/pf-tools-ip
====================

工具——IPV4解析成对应的地址区域信息

1.0.1(7y ago)07MITPHP

Since Mar 20Pushed 7y agoCompare

[ Source](https://github.com/qingbing/pf-tools-ip)[ Packagist](https://packagist.org/packages/qingbing/pf-tools-ip)[ Docs](http://www.phpcorner.net)[ RSS](/packages/qingbing-pf-tools-ip/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

pf-tools-ip
===========

[](#pf-tools-ip)

描述
--

[](#描述)

工具——IPV4 解析成对应的地址区域信息

link
----

[](#link)

-
-

注意事项
----

[](#注意事项)

- 本版本中免费版中不支持非常详尽的IP地址信息

使用方法
----

[](#使用方法)

### 1. 代码

[](#1-代码)

```
// 获取国家、省份、城市信息（用索引返回）
var_dump(\Tools\Ip::getInstance()->getCity()->find('118.28.1.1', 'CN'));
// 获取国家、省份、城市信息（用键值返回）
var_dump(\Tools\Ip::getInstance()->getCity()->findMap('118.28.1.1', 'CN'));
// 获取ip详细信息，免费版基本无用
var_dump(\Tools\Ip::getInstance()->getCity()->findInfo('118.28.1.1', 'CN'));
```

### 2. 输出

[](#2-输出)

```
Array
(
    [0] => 中国
    [1] => 天津
    [2] => 天津
)
Array
(
    [country_name] => 中国
    [region_name] => 天津
    [city_name] => 天津
)
IpSupports\CityInfo Object
(
    [country_name] => 中国
    [region_name] => 天津
    [city_name] => 天津
    [owner_domain] =>
    [isp_domain] =>
    [latitude] =>
    [longitude] =>
    [timezone] =>
    [utc_offset] =>
    [china_admin_code] =>
    [idd_code] =>
    [country_code] =>
    [continent_code] =>
    [idc] =>
    [base_station] =>
    [country_code3] =>
    [european_union] =>
    [currency_code] =>
    [currency_name] =>
    [anycast] =>
)
```

====== 异常代码集合 ======
--------------------

[](#-异常代码集合-)

异常代码格式：1025 - XXX - XX （组件编号 - 文件编号 - 代码内异常）

```
 - 无

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

2611d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9379d2ee4885074de75faa3fa12970614186826f762df3c4aa0905dc1ff3b513?d=identicon)[qingbing](/maintainers/qingbing)

---

Top Contributors

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

---

Tags

phpIPipdb17monipdb

### Embed Badge

![Health badge](/badges/qingbing-pf-tools-ip/health.svg)

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

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[ipip/db

IPIP.net officially supported IP database ipdb format parsing library

139204.2k6](/packages/ipip-db)

PHPackages © 2026

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