PHPackages                             overals/yii2-geoip2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. overals/yii2-geoip2

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

overals/yii2-geoip2
===================

Yii2 GeoIP2 extension. Returns country, city, latitude, longitude, time zone, iso code, continent, subdivisions by IP (uses MaxMind's GeoIP2 databases)

1.0.2(8y ago)014.1k↓18.5%2MITPHPPHP &gt;=5.4.0

Since Dec 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/overals/yii2-geoIP2)[ Packagist](https://packagist.org/packages/overals/yii2-geoip2)[ RSS](/packages/overals-yii2-geoip2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

Yii2 GeoIP2 extension
=====================

[](#yii2-geoip2-extension)

Provides information about geographical location of user by IP address.

Currently available:

- Country
- City
- Latitude, Longitude
- Time Zone
- ISO Code
- Continent
- Subdivisions

Installation
------------

[](#installation)

```
$ php composer.phar require overals/yii2-geoip2 "~1.0.1"
```

#### OR

[](#or)

Add to your `composer.json`

```
{
    "require": {
        "overals/yii2-geoip2": "~1.0.1"
    }
}
```

and run

```
$ composer update
```

Usage
-----

[](#usage)

Update your config file - config/web.php

```
