PHPackages                             riskivy/yii2-geoip - 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. riskivy/yii2-geoip

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

riskivy/yii2-geoip
==================

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

v1.0.0(7y ago)021MITPHPPHP &gt;=5.4.0

Since Dec 4Pushed 7y agoCompare

[ Source](https://github.com/riskivy/yii2-geoip)[ Packagist](https://packagist.org/packages/riskivy/yii2-geoip)[ RSS](/packages/riskivy-yii2-geoip/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Yii 2 GeoIP extension
=====================

[](#yii-2-geoip-extension)

Provides information about geographical location of user by IP address.

Currently available:

- Country
- City
- Latitude, Longitude
- Country ISO Code

Install
-------

[](#install)

Run

```
$ php composer.phar require riskivy/yii2-geoip "~1.0"
```

#### OR

[](#or)

add to your `composer.json`

```
{
    "require": {
        "riskivy/yii2-geoip": "~1.0"
    }
}
```

and run

```
$ php composer update
```

Usage
-----

[](#usage)

### Like component

[](#like-component)

```
