Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ipipdotnet/datx-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

重要提示

datx格式将全面升级为ipdb格式 IPDB格式解析代码

ipdb 格式优点

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

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /