eddy/ip2region

php client for ip2region

v1.0 2019-04-09 09:24 UTC

This package is auto-updated.

Last update: 2024-05-09 21:11:53 UTC


README

说明

库文件ip2region.db生成参考:ip2region

安装

composer require eddy/ip2region

使用方法

//在本项目的 src/data 目录下已经生成好了一份 ip2region.db 文件,可以复制到你的项目直接使用。当然你也可以自己生成一份最新的文件。
$ip2region_db_file_location = 'ip2region.db';
$client = new eddy\Ip($ip2region_db_file_location);
$data = $client->memorySearch('220.168.85.64');
print_r($data);