PHPackages                             niaoyoo/iplocation - 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. niaoyoo/iplocation

ActiveLibrary

niaoyoo/iplocation
==================

纯真IP库

v1.0.3(7y ago)060MITPHPPHP &gt;=5.4.0

Since Jun 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/NiaoYoo/tp-iplocation)[ Packagist](https://packagist.org/packages/niaoyoo/iplocation)[ RSS](/packages/niaoyoo-iplocation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/04705e51ab3d9cf08d3bad7740b16c313424044ee7f12423db225834430251b0/68747470733a2f2f706f7365722e707567782e6f72672f6e69616f796f6f2f69706c6f636174696f6e2f762f737461626c65)](https://packagist.org/packages/niaoyoo/iplocation)[![Total Downloads](https://camo.githubusercontent.com/0ab7ee7acc38d12976e420b5d84efc0d55d605947ce38053b71a22017f0f8f63/68747470733a2f2f706f7365722e707567782e6f72672f6e69616f796f6f2f69706c6f636174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/niaoyoo/iplocation)[![Latest Unstable Version](https://camo.githubusercontent.com/c9193fd0a164a891d218fb88510c3b9945ebf808dee07bf0ac5b99b38c33578e/68747470733a2f2f706f7365722e707567782e6f72672f6e69616f796f6f2f69706c6f636174696f6e2f762f756e737461626c65)](https://packagist.org/packages/niaoyoo/iplocation)[![License](https://camo.githubusercontent.com/046c8df9eca7b37bff7ef5e21d011bb7448b72efaddf82386351e85367647e97/68747470733a2f2f706f7365722e707567782e6f72672f6e69616f796f6f2f69706c6f636174696f6e2f6c6963656e7365)](https://packagist.org/packages/niaoyoo/iplocation)

安装
--

[](#安装)

安装这个扩展的首选方式是通过 [composer](http://getcomposer.org/download/).

执行

```
composer require niaoyoo/iplocation
```

或添加

```
"niaoyoo/iplocation": "~1.0.0"

```

根据IP查询
------

[](#根据ip查询)

```
use IpLocation;

$ipLocation = new IpLocation();
$locationModel = $ipLocation->getLocation('8.8.8.8');
print_r($locationModel);
// Array
// (
//     [ip] => 8.8.8.8
//     [begin_ip] => 8.8.8.8
//     [end_ip] => 8.8.8.8
//     [country] => 美国
//     [area] => 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器
// )
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

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

Every ~158 days

Total

3

Last Release

2567d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/642ac9092471ae29ba99a4cd1cbd6808fcc3c84a9b37c93c4bc292a12ec88217?d=identicon)[niaoyoo](/maintainers/niaoyoo)

---

Top Contributors

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

---

Tags

thinkphpiplocationthinkphpIP

### Embed Badge

![Health badge](/badges/niaoyoo-iplocation/health.svg)

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

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[zhongshaofa/easyadmin

基于ThinkPHP6.0和layui的快速开发的后台管理系统。

6609.3k](/packages/zhongshaofa-easyadmin)[casbin/think-authz

An authorization library that supports access control models like ACL, RBAC, ABAC for ThinkPHP.

27918.5k6](/packages/casbin-think-authz)[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)[xiaodi/think-pullword

ThinkPHP 分词/抽词 扩展包

5512.1k](/packages/xiaodi-think-pullword)

PHPackages © 2026

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