2017 © Pedro Peláez
 

yii2-extension yii2-zx-geoip-country

Yii 2 GeoIP extension. Returns country of current or specified IP (uses MaxMind's GeoIP2 databases)

image

zertex/yii2-zx-geoip-country

Yii 2 GeoIP extension. Returns country of current or specified IP (uses MaxMind's GeoIP2 databases)

  • Thursday, March 23, 2017
  • by Error202
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Yii 2 GeoIP Country extension - Zertex CMS

Provides information about country of user by IP address., (*1)

Currently available: * Country * Country ISO Code, (*2)

Install

Run, (*3)

$ php composer.phar require zertex/yii2-zx-geoip-country "~1.0"

OR

add to your composer.json, (*4)

{
    "require": {
        "zertex/yii2-zx-geoip-country": "~1.0"
    }
}

and run, (*5)

$ php composer update

Usage

Like component

<?php

$config = [
    ...
    'components' => [
        'geoip' => ['class' => 'zertex\GeoIP\GeoIP'],
    ]
    ...
];

somewhere in code, (*6)

$ip = Yii::$app->geoip->ip(); // current user ip

$ip = Yii::$app->geoip->ip("111.111.111.111");

$ip->country; // "United States"

Like object directly somewhere in your application

$geoip = new \zertex\GeoIP\GeoIP();
$ip = $geoip->ip("111.111.111.111");

$ip->country; // "United States"

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com, (*7)

The Versions

23/03 2017

dev-master

9999999-dev

Yii 2 GeoIP extension. Returns country of current or specified IP (uses MaxMind's GeoIP2 databases)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Egorka

geoip yii2 geolocation maxmind

23/03 2017

1.0.2

1.0.2.0

Yii 2 GeoIP extension. Returns country of current or specified IP (uses MaxMind's GeoIP2 databases)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Egorka

geoip yii2 geolocation maxmind

23/03 2017

1.0.1

1.0.1.0

Yii 2 GeoIP extension. Returns country of current or specified IP (uses MaxMind's GeoIP2 databases)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Egorka

geoip yii2 geolocation maxmind