PHPackages                             naux/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. naux/iplocation

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

naux/iplocation
===============

基于纯真IP库的,查询IP归属地PHP库

199708PHP

Since Nov 21Pushed 11y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

\#介绍 PHP实现 基于纯真IP库 根据IP地址查找对应的地理位置信息

\####更新的版本 本库附带的`qqwry.dat`文件是`2014.11.20`更新的，如你需要更新的版本，请点击 [此处](http://www.cz88.net/) 到页面右上角下载更新的版本。dat文件官网5天一次更新。

\####更高的性能

如果你需要更高的性能，请使用 [C扩展库](http://pecl.php.net/package/qqwry)

\#安装

在你的`composer.json`中加入

```
"require": {
    "naux/iplocation": "dev-master"
},
```

\#使用

```
use Naux\IpLocation\IpLocation;

$ip = new IpLocation();

$location = $ip->getlocation('119.75.217.56');
```

`$location`的内容如下

```
array (size=5)
  'ip' => string '119.75.217.56' (length=13)
  'beginip' => string '119.75.208.0' (length=12)
  'endip' => string '119.75.223.255' (length=14)
  'country' => string '北京市' (length=9)
  'area' => string '北京百度网讯科技有限公司BGP节点' (length=45)
```

\####指定其他路径的纯真库dat文件

```
use Naux\IpLocation\IpLocation;

$ip = new IpLocation('/home/qqwry.dat');
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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://www.gravatar.com/avatar/22071ff5935f95277f8b0c794c2f23703e6de307ed0e65e25e7c3a878a45c012?d=identicon)[NauxLiu](/maintainers/NauxLiu)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[workerman/gateway-worker-for-win

1711.1k2](/packages/workerman-gateway-worker-for-win)

PHPackages © 2026

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