2021-02-09 11:36:03 +08:00
2020-11-26 15:40:49 +08:00
2021-02-09 11:36:03 +08:00
2019-09-18 00:40:52 +08:00
2020-09-24 13:30:57 +08:00
2019-09-18 00:20:43 +08:00
2019-09-18 00:40:52 +08:00
2019-09-18 00:40:52 +08:00

ip2region SDK for PHP

Installation

composer require chinayin/ip2region

Quick Examples

use lionsoul2014\Ip2Region;

$ip2region = new Ip2Region;

$ip = '220.181.38.150';
$data = $ip2region->memorySearch($ip);
$data = $ip2region->binarySearch($ip);
$data = $ip2region->btreeSearch($ip);

// binary算法/b-tree算法/Memory算法
// 0.x毫秒/0.1x毫秒/0.1x毫秒
// 任何客户端b-tree都比binary算法快当然Memory算法固然是最快的
Description
ip2region SDK for PHP. composer require chinayin/ip2region
Readme Apache-2.0 19 MiB
Languages
PHP 100%