Giter Site home page Giter Site logo

angelyouyou / zx-ip-address Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ritaswc/zx-ip-address

2.0 1.0 0.0 90.63 MB

IPv4/IPv6 offline address database.IPv4/IPv6双栈地址离线数据库。IPv4 by 纯真网络,IPv6 by ZX Inc.

License: MIT License

PHP 100.00%

zx-ip-address's Introduction

FOSSA Status Build Status Total Downloads Latest Stable Version License PHP Version >= 7.0

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-03-04 with 528560 records

IPv6 address locations by Zx Inc.

database updated at 2020-05-06 with 140993 records

Usage/使用方法

composer require ritaswc/zx-ip-address

Your code/你的业务代码

$result = \Ritaswc\ZxIPAddress\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 = \Ritaswc\ZxIPAddress\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 = \Ritaswc\ZxIPAddress\IPv4Tool::isValidAddress('114.114.114.114');
/*
$valid = true;
 */
$valid = \Ritaswc\ZxIPAddress\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 ritaswc/zx-ip-address

Official Website/官方网站

Author Blog/作者博客

QQ Group/QQ交流群

  • ZX IPv6地址库交流群 23871048

Sponsor/赞助

QrCode

License/使用协议

ZxIpAddress is licensed under MIT.

FOSSA Status

zx-ip-address's People

Contributors

dependabot-preview[bot] avatar fossabot avatar ritaswc avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.