PHPackages                             chenkby/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. chenkby/ip

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

chenkby/ip
==========

IP所属地查询

v1.0(8y ago)1149BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 25Pushed 8y ago1 watchersCompare

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

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

IP所属地查询
=======

[](#ip所属地查询)

使用淘宝及sina公共API查询IP所属地

安装
--

[](#安装)

composer

```
$ php composer.phar require chenkby/ip:1.0
```

或者添加以下代码到`composer.json`文件的`require`块中：

```
"chenkby/ip": "1.0"

```

使用
--

[](#使用)

```
Ip::query('8.8.8.8');
```

返回值
---

[](#返回值)

```
Array
(
    [country] => 中国
    [province] => 广东
    [city] => 广州
)
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3078d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35e20aecf431c03a9ea9cbfd44180e97599e2d9db47ca87c408ee16173c5c1a2?d=identicon)[chenkby](/maintainers/chenkby)

---

Top Contributors

[![chenkby](https://avatars.githubusercontent.com/u/13486227?v=4)](https://github.com/chenkby "chenkby (10 commits)")

---

Tags

cityipprovinceregionIPcityregionprovince

### Embed Badge

![Health badge](/badges/chenkby-ip/health.svg)

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

###  Alternatives

[damianociarla/select-city-form-field-bundle

This Bundle provides a new form field that renders three select 'Country, Region, City' for Symfony2

101.9k](/packages/damianociarla-select-city-form-field-bundle)

PHPackages © 2026

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