IPv4/IPv6 offline address database.IPv4/IPv6双栈地址离线数据库。IPv4 by 纯真网络,IPv6 by ZX Inc.
Being updating every 5 days 每5天更新一次
IPv4 address locations by 纯真网络
database updated at 2021-09-22 with 528467 records
IPv6 address locations by Zx Inc.
database updated at 2021-07-26 with 178724 records
Usage/使用方法
composer require zx-inc/zxipdb
Your code/你的业务代码
$result = \ZxInc\Zxipdb\IPTool::query('8.8.8.8');
/*
$result = [
"start" => "8.8.8.8"
"end" => "8.8.8.8"
"addr" => array:2 [
0 => "美国"
1 => "加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器"
]
"disp" => "美国 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器"
]
*/
$result = \ZxInc\Zxipdb\IPTool::query('240e:e9:8819:0:3::3f9');
/*
$result = [
"start" => "240e:e9:8800::"
"end" => "240e:e9:8fff:ffff::"
"addr" => array:2 [
0 => "中国江苏省苏州市"
1 => "中国电信IDC"
]
"disp" => "中国江苏省苏州市 中国电信IDC"
]
*/
$valid = \ZxInc\Zxipdb\IPv4Tool::isValidAddress('114.114.114.114');
/*
$valid = true;
*/
$valid = \ZxInc\Zxipdb\IPv6Tool::isValidAddress('240e:e9:8819:0:3::3f9');
/*
$valid = true;
*/
Notice/使用提示
- We don't recommend forking this repository/不推荐fork此仓库
- We recommend using linux's crontab to update ip database/推荐使用linux计划任务定期更新数据库
Auto update database/自动更新数据库
crontab -e
# add line/增加一行,每小时更新一次
0 * * * * * cd /var/www/your_project && composer require zx-inc/zxipdb
Official Website/官方网站
Author Blog/作者博客
QQ Group/QQ交流群
- RTBAsia x 纯真IP技术组 482139657
- ZX IPv6地址库交流群 23871048
Sponsor/赞助
License/使用协议
ZxIpAddress is licensed under MIT.