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

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

kukla-svitla/yii2-geoip
=======================

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

1.0.1(2y ago)021MITPHPPHP &gt;=5.4.0

Since Nov 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kukla-svitla/yii2-geoip)[ Packagist](https://packagist.org/packages/kukla-svitla/yii2-geoip)[ RSS](/packages/kukla-svitla-yii2-geoip/feed)WikiDiscussions main Synced 1mo ago

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

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/d4a9d0dce045403fd4f7239b25eb56e3a4f4491e9f2ea3be91f1c862ebae55cc/68747470733a2f2f706f7365722e707567782e6f72672f6b756b6c612d737669746c612f796969322d67656f69702f76657273696f6e)](https://packagist.org/packages/kukla-svitla/yii2-geoip) [![Total Downloads](https://camo.githubusercontent.com/e4e201747a2b54708395c392f109d1c001ac1b3babedcf1b81ef96ef762d951f/68747470733a2f2f706f7365722e707567782e6f72672f6b756b6c612d737669746c612f796969322d67656f69702f646f776e6c6f616473)](https://packagist.org/packages/kukla-svitla/yii2-geoip) [![Build Status](https://camo.githubusercontent.com/d03d064d0e03d80ea647ec52f9fdef0b047f5ad88f954c8a4eac3cec3db4c97e/68747470733a2f2f7472617669732d63692e6f72672f6b756b6c612d737669746c612f796969322d67656f69702e7376673f6272616e63683d312e302e31)](https://travis-ci.org/kukla-svitla/yii2-geoip) [![HHVM Status](https://camo.githubusercontent.com/837db939e37fbb63ccb394f2a55f41dc37cc16cfbd92ac5267738c30ebea6a67/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f6b756b6c612d737669746c612f796969322d67656f69702e737667)](http://hhvm.h4cc.de/package/kukla-svitla/yii2-geoip) [![CodeClimate](https://camo.githubusercontent.com/7c6298a008e3868b0c94af17976741a1ec7b163af96fe75175c76a480e35bcce/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b756b6c612d737669746c612f796969322d67656f69702e706e67)](https://codeclimate.com/github/kukla-svitla/yii2-geoip)

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 kukla-svitla/yii2-geoip "~1.0"
```

#### OR

[](#or)

add to your `composer.json`

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

and run

```
$ php composer update
```

Usage
-----

[](#usage)

### Like component

[](#like-component)

```
