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

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

valackar/yii2-geoip
===================

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

034PHP

Since Oct 10Pushed 3y agoCompare

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

READMEChangelog (1)DependenciesVersions (1)Used By (0)

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/73db77e26ed66786c03fdaa42280a7668445f88b8c8936ba9774fbf441ca7615/68747470733a2f2f706f7365722e707567782e6f72672f6c7973656e6b6f62762f796969322d67656f69702f76657273696f6e)](https://packagist.org/packages/lysenkobv/yii2-geoip) [![Total Downloads](https://camo.githubusercontent.com/24e9fb127c32175072387ad678fe04200155d17c3f81de65db3c7d2194f5fc0f/68747470733a2f2f706f7365722e707567782e6f72672f6c7973656e6b6f62762f796969322d67656f69702f646f776e6c6f616473)](https://packagist.org/packages/lysenkobv/yii2-geoip) [![Build Status](https://camo.githubusercontent.com/1a1ea503b19fe0452ba4a754fc79ea4fe06e8f6997c139e11ef1011faa4093f6/68747470733a2f2f7472617669732d63692e6f72672f6c7973656e6b6f62762f796969322d67656f69702e7376673f6272616e63683d312e302e31)](https://travis-ci.org/lysenkobv/yii2-geoip) [![HHVM Status](https://camo.githubusercontent.com/0683d7212b7d7cfa64f40b95cf255079c54b655817915dcffdbc073e3252964c/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f6c7973656e6b6f62762f796969322d67656f69702e737667)](http://hhvm.h4cc.de/package/lysenkobv/yii2-geoip) [![CodeClimate](https://camo.githubusercontent.com/6beeb0bb03788305a3b385b1ba5cc8ecce8f2ac0abc14c9fe6fde90bdf79cd33/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c7973656e6b6f62762f796969322d67656f69702e706e67)](https://codeclimate.com/github/lysenkobv/yii2-geoip)

---

This repository is no longer maintaintained
===========================================

[](#this-repository-is-no-longer-maintaintained)

---

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

#### OR

[](#or)

add to your `composer.json`

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

and run

```
$ php composer update
```

Usage
-----

[](#usage)

### Like component

[](#like-component)

```
