PHPackages                             ipip/datx - 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. ipip/datx

ActiveLibrary

ipip/datx
=========

IPIP.net官方支持的IP数据库datx格式解析库

v0.2.0(8y ago)3731.0k↓80.6%6[1 PRs](https://github.com/ipipdotnet/datx-php/pulls)Apache-2.0PHPPHP &gt;=5.4.0

Since Mar 8Pushed 7y ago2 watchersCompare

[ Source](https://github.com/ipipdotnet/datx-php)[ Packagist](https://packagist.org/packages/ipip/datx)[ Docs](https://www.ipip.net)[ RSS](/packages/ipip-datx/feed)WikiDiscussions master Synced 1mo ago

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

重要提示
====

[](#重要提示)

datx格式将全面升级为ipdb格式 [IPDB格式解析代码](https://github.com/ipipdotnet/ipdb-php)

ipdb 格式优点
---------

[](#ipdb-格式优点)

- 可同时支持IPv4与IPv6
- 可同时支持中文与英文
- 查询性能大幅度提高

### datx-php

[](#datx-php)

IPIP.net官方支持的解析datx格式的php代码

#### 安装说明

[](#安装说明)

```
composer require ipip/datx
```

#### 使用示例

[](#使用示例)

```

require_once __DIR__ . '/vendor/autoload.php';

$bs = new ipip\datx\City("/path/to/mydata4vipday4.datx"); // 城市级数据库
var_export($bs->find("223.220.233.0"));

$bs = new ipip\datx\District("/path/to/quxian.datx"); //
var_export($bs->find("1.12.29.0"));

$bs = new ipip\datx\BaseStation("/path/to/station_ip.datx");
var_export($bs->find("223.220.233.0"));

```

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% 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

2984d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22ba08f40dd32d13a8ed40800dc7cbdd21be082b09677f8c7e1b3dea0868e283?d=identicon)[IPIP.net](/maintainers/IPIP.net)

---

Top Contributors

[![ilsanbao](https://avatars.githubusercontent.com/u/347676?v=4)](https://github.com/ilsanbao "ilsanbao (11 commits)")[![ipipdotnet](https://avatars.githubusercontent.com/u/36761250?v=4)](https://github.com/ipipdotnet "ipipdotnet (4 commits)")

---

Tags

geoipgeolocationIPgeoipip.netdatx

### Embed Badge

![Health badge](/badges/ipip-datx/health.svg)

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

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M293](/packages/geoip2-geoip2)[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)[maxmind-db/reader

MaxMind DB Reader API

69799.2M47](/packages/maxmind-db-reader)

PHPackages © 2026

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