Skip to content

ipipdotnet/datx-php

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

重要提示

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