2017 © Pedro Peláez
 

library ipv4

IP v4 中国城市地址库

image

larryli/ipv4

IP v4 中国城市地址库

  • Monday, January 18, 2016
  • by larryli
  • Repository
  • 2 Watchers
  • 14 Stars
  • 4,547 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 26 Versions
  • 5 % Grown

The README.md

IP v4 中国城市地址库

整理 IPIP.netQQ IP 数据库纯真版 为符合中华人民共和国行政区划代码的国家与地区、省或直辖市、地级市或省管县级市地址。, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License Build Status, (*2)

目标

在 IPIP.net 库的基础上去掉 IDC/ISP 数据补上纯真 IP 库的数据,然后生成下列四个库:, (*3)

  • mini迷你库用于快速识别中华人民共和国境内 IP(不含台澎金马、香港、澳门);
  • china: 国内城市库用于定位中华人民共和国第一级和第二级行政区划(含部分省管第三级行政区划),即俗称的城市定位(含台湾、香港、澳门,作为第一级行政区划);
  • world: 国家库用于定位国家与地区(含台湾、香港、澳门地区);
  • full: 完整库是国内城市库与国家地区库的合集(台湾、香港、澳门作为中华人民共和国第一级行政区划);

通过 composer 安装

composer require larryli/ipv4

使用

$monipdb = new \larryli\ipv4\MonipdbQuery(__DIR__ . '/17monipdb.dat');
if (!$monipdb->exists()) {
    $monipdb->init();
}
$qqwry = new \larryli\ipv4\QqwryQuery(__DIR__ . '/qqwry.dat');
if (!$qqwry->exists()) {
    $qqwry->init();
}
$your_query = new \larryli\ipv4\FullQuery(new YourDatabase());
if (!$your_query->exists()) {
    $your_query->setProviders([$monipdb, $qqwry]);
    $your_query->init();
}
$your_query->find(ip2long('127.0.0.1'));

class YourDatabase extends \larryli\ipv4\Database
{
    ...
}

可以选用 larryli/ipv4-medoo\larryli\ipv4\medoo\Database。, (*4)

相关包

The Versions

18/01 2016

dev-master

9999999-dev https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

18/01 2016

1.0.2

1.0.2.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

10/01 2016

1.0.1

1.0.1.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

19/09 2015

dev-stable

dev-stable https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

19/09 2015

1.0.0

1.0.0.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

17/09 2015

1.0.0-beta2

1.0.0.0-beta2 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

17/09 2015

1.0.0-beta

1.0.0.0-beta https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

16/09 2015

1.0.0-alpha3

1.0.0.0-alpha3 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

16/09 2015

1.0.0-alpha2

1.0.0.0-alpha2 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

16/09 2015

1.0.0-alpha

1.0.0.0-alpha https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

12/09 2015

dev-support/0.1

dev-support/0.1 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

12/09 2015

0.1.2

0.1.2.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

11/09 2015

0.1.1

0.1.1.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.1.0

0.1.0.0 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.1.0-beta

0.1.0.0-beta https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.1.0-alpha2

0.1.0.0-alpha2 https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires

09/09 2015

0.1.0-alpha

0.1.0.0-alpha https://github.com/larryli/ipv4

IP v4 中国城市地址库

  Sources   Download

MIT

The Requires

 

The Development Requires