Skip to content

Commit

Permalink
The last release.最后一次更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ritaswc committed Aug 25, 2021
1 parent 0033bca commit a5c1fce
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 78 deletions.
80 changes: 4 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,19 @@
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address?ref=badge_shield)
[![Build Status](https://www.travis-ci.org/ritaswc/zx-ip-address.svg?branch=main)](https://travis-ci.com/github/ritaswc/zx-ip-address)
<a href="https://packagist.org/packages/ritaswc/zx-ip-address"><img src="https://img.shields.io/packagist/dt/ritaswc/zx-ip-address" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/ritaswc/zx-ip-address"><img src="https://img.shields.io/packagist/v/ritaswc/zx-ip-address" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/ritaswc/zx-ip-address"><img src="https://img.shields.io/packagist/l/ritaswc/zx-ip-address" alt="License"></a>
<a href="https://www.php.net"><img src="https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square" alt="PHP Version >= 5.6"></a>


## IPv4/IPv6 offline address database.IPv4/IPv6双栈地址离线数据库。IPv4 by 纯真网络,IPv6 by ZX Inc.
##### Being updating every <font color=#FF0000 size=36>5</font> days 每<font color=#FF0000 size=36>5</font>天更新一次
## 此仓库已经搬迁,不再更新,请看[https://github.com/ZX-Inc/zxipdb-php](https://github.com/ZX-Inc/zxipdb-php)
## This repository is deprecated,Go to [https://github.com/ZX-Inc/zxipdb-php](https://github.com/ZX-Inc/zxipdb-php)

### IPv4 address locations by 纯真网络
database updated at <font color=#FF0000 size=36>2021-08-18</font> with <font color=#FF0000 size=36>530725</font> records
database updated at <font color=#FF0000 size=36>2021-08-25</font> with <font color=#FF0000 size=36>528081</font> records

### IPv6 address locations by Zx Inc.
database updated at <font color=#FF0000 size=36>2021-07-26</font> with <font color=#FF0000 size=36>178724</font> records

### Usage/使用方法
```shell script
composer require ritaswc/zx-ip-address
```
Your code/你的业务代码
```php
$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/自动更新数据库
```shell
crontab -e
# add line/增加一行,每小时更新一次
0 * * * * * cd /var/www/your_project && composer require ritaswc/zx-ip-address
```



### Official Website/官方网站
- [纯真IPv4数据库](https://www.cz88.net/)
- [IPv6地址查询工具 Hongkong/Tokyo](http://ip.zxinc.org)
- [IPv6地址查询工具 Ningbo](https://ip.shanshan-business.com)
- [IPv6地址查询工具 Beijing](https://ip.yinghualuo.cn)

### Author Blog/作者博客
- [Charles的小星球](https://blog.yinghualuo.cn)

### QQ Group/QQ交流群
- RTBAsia x 纯真IP技术组 482139657
- ZX IPv6地址库交流群 23871048

### Sponsor/赞助
![QrCode](https://blog.yinghualuo.cn/blog/2020/11/sponsor.png)

### License/使用协议
ZxIpAddress is licensed under [MIT](https://github.com/ritaswc/zx-ip-address/blob/main/LICENSE).

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fritaswc%2Fzx-ip-address?ref=badge_large)
ZxIpAddress is licensed under [MIT](https://github.com/ritaswc/zx-ip-address/blob/main/LICENSE).
4 changes: 3 additions & 1 deletion src/ZxIPAddress/IPTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

namespace Ritaswc\ZxIPAddress;


/**
* @deprecated see https://github.com/ZX-Inc/zxipdb-php
*/
class IPTool
{
public static function query($ip)
Expand Down
3 changes: 3 additions & 0 deletions src/ZxIPAddress/IPv4Tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Ritaswc\ZxIPAddress;

/**
* @deprecated see https://github.com/ZX-Inc/zxipdb-php
*/
class IPv4Tool
{
const FILE = __DIR__ . '/../database/ipv4wry.db';
Expand Down
3 changes: 3 additions & 0 deletions src/ZxIPAddress/IPv6Tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Ritaswc\ZxIPAddress;

/**
* @deprecated see https://github.com/ZX-Inc/zxipdb-php
*/
class IPv6Tool
{
const FILE = __DIR__ . '/../database/ipv6wry.db';
Expand Down
4 changes: 3 additions & 1 deletion src/ZxIPAddress/InvalidIpAddressException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

namespace Ritaswc\ZxIPAddress;


/**
* @deprecated see https://github.com/ZX-Inc/zxipdb-php
*/
class InvalidIpAddressException extends \InvalidArgumentException
{

Expand Down
3 changes: 3 additions & 0 deletions src/ZxIPAddress/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
namespace Ritaswc\ZxIPAddress;

/**
* @deprecated see https://github.com/ZX-Inc/zxipdb-php
*/
class RuntimeException extends \RuntimeException{}
Binary file modified src/database/ipv4wry.db
Binary file not shown.

0 comments on commit a5c1fce

Please sign in to comment.