2017 © Pedro Peláez
 

yii2-extension yii2-ip2location

An Yii2 extension for ip to location

image

lulubin/yii2-ip2location

An Yii2 extension for ip to location

  • Saturday, December 3, 2016
  • by lulubin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

1.Install

composer require --prefer-dist lulubin/yii2-ip2location "dev-master", (*1)

2.Usage

根据IP查询

use lulubin\ip2location\Ip2Location;
$ipLocation = new Ip2Location();
$locationModel = $ipLocation->getLocation('8.8.8.8');
print_r($locationModel->toArray());
/* Array
 (
    [ip] => 8.8.8.8
    [begin_ip] => 8.8.8.8
    [end_ip] => 8.8.8.8
    [country] => 美国
    [area] => 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器
 )*/

升级数据库

```php use lulubin\ip2location\QQWry; $qqwry = new QQWry(); $qqwry->upgrade();, (*2)

The Versions

03/12 2016

dev-master

9999999-dev https://github.com/lulubin/yii2-ip2location

An Yii2 extension for ip to location

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 ip2location

01/12 2016

1.0.0

1.0.0.0 https://github.com/lulubin/yii2-ip2location

An Yii2 extension for ip to location

  Sources   Download

BSD 3-Clause

extension yii2 hello