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

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

kostikpenzin/yii2-geoip
=======================

Yii2 geoip extension for Sypex Geo API

v0.0.3(3y ago)12961[1 issues](https://github.com/kostikpenzin/yii2-geoip/issues)BSD-2-ClausePHP

Since Mar 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kostikpenzin/yii2-geoip)[ Packagist](https://packagist.org/packages/kostikpenzin/yii2-geoip)[ Docs](https://github.com/kostikpenzin/yii2-geoip)[ RSS](/packages/kostikpenzin-yii2-geoip/feed)WikiDiscussions main Synced 3d ago

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

yii2-geoip
==========

[](#yii2-geoip)

[![Latest Stable Version](https://camo.githubusercontent.com/e531156583d591743713a0beed1e282309fd88d981d8b828a647345028698122/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f796969322d67656f69702f762f737461626c65)](https://packagist.org/packages/kostikpenzin/yii2-geoip)[![Total Downloads](https://camo.githubusercontent.com/bf2be0f9e8f464668c9f14e048212e6d7acb4731e7829d1c304f39630f0639bb/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f796969322d67656f69702f646f776e6c6f616473)](https://packagist.org/packages/kostikpenzin/yii2-geoip)[![Latest Unstable Version](https://camo.githubusercontent.com/e6c9e2bf334b4195cf864bcf2793652dc8fd9d09dbc36070da68f33b593bde7e/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f796969322d67656f69702f762f756e737461626c65)](https://packagist.org/packages/kostikpenzin/yii2-geoip)[![License](https://camo.githubusercontent.com/8a67ba6e16c98e148e020ceb2bd7d35bce2cfd987deddc0ac39b7d47db1e2e95/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f796969322d67656f69702f6c6963656e7365)](https://packagist.org/packages/kostikpenzin/yii2-geoip)[![Monthly Downloads](https://camo.githubusercontent.com/bf9ee68f7aa04e10dcdef9a4f9f40ce097ed046b0a745938122fa648e1f48f75/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7374696b70656e7a696e2f796969322d67656f69702f642f6d6f6e74686c79)](https://packagist.org/packages/kostikpenzin/yii2-geoip)

Geo ip for Yii2

Sypex Geo is an IP location based product from the creators of Sypex Dumper. Having received the IP-address, Sypex Geo gives out information about the visitor's location - country, region, city, geographic coordinates.

Sypex Geo - distributed under the BSD license, that is, it is completely free.

As a database, Sypex Geo uses a binary file of its own format. This format is open and universal. When developing the format, a lot of work was done to optimize the algorithm. Due to this, Sypex Geo works much faster than competitors, consumes less memory, and also produces fewer disk accesses (due to which, on busy servers, the difference is even greater in favor of Sypex Geo).

Direct links to the database:

- Sypex Geo City DB (free) - [http://sypexgeo.net/files/SxGeoCity\_utf8.zip](http://sypexgeo.net/files/SxGeoCity_utf8.zip)
- Sypex Geo City Max DB -

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist kostikpenzin/yii2-geoip "*"

```

or add

```
"kostikpenzin/yii2-geoip": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
