IPIP.net官方支持的解析datx格式的php代码
Switch branches/tags
Nothing to show
Clone or download
Latest commit 320b399 May 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/ipip/datx update Mar 8, 2018
LICENSE Initial commit Mar 4, 2018
README.md update May 15, 2018
autoload.php update Mar 4, 2018
composer.json update Mar 8, 2018
example.php update Mar 8, 2018

README.md

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"));