ip2region-sdk-php/README.md
2019-09-18 00:40:52 +08:00

21 lines
480 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### ip2region SDK for PHP
### Installation
> composer require chinayin/ip2region
### Quick Examples
```php
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算法固然是最快的
```