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

ActiveYii2-extension

conquer/geoip
=============

Yii2 geoip componet

1.0(10y ago)0906MITPHPPHP &gt;=5.4.0

Since Nov 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/borodulin/yii2-geoip)[ Packagist](https://packagist.org/packages/conquer/geoip)[ Docs](https://github.com/borodulin/yii2-geoip)[ RSS](/packages/conquer-geoip/feed)WikiDiscussions master Synced 2mo ago

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

Geo IP component for Yii2 framework
===================================

[](#geo-ip-component-for-yii2-framework)

Описание
--------

[](#описание)

Компонент для работы с базой [ipgeobase.ru](http://ipgeobase.ru)

Установка
---------

[](#установка)

Устанавливать нужно через композер [composer](http://getcomposer.org/download/).

Командой:

```
$ php composer.phar require conquer/select2 "*"

```

или добавить

```
"conquer/select2": "*"

```

в секцию `require` файла проекта `composer.json`.

Чтобы создать структуру БД нужно запустить миграцию:

```
$ yii migrate --migrationPath=@conquer/geoip/migrations

```

Настройка
---------

[](#настройка)

Требуется указать компоненту "geoip". Дополнительно можно настроить имена таблиц (! до запуска миграции):

```
 'components' => [
        'geoip' => [
            'class' => 'conquer\geoip\Geoip',
            'cityTable' => 'geoip.city',
            'districtTable' => 'geoip.district',
            'rangeTable' => 'geoip.range',
            'regionTable' => 'geoip.region',
        ],
    ],
```

В конфигурации консольного приложения компоненту необходимо добавить в автозагрузку.

```
'bootstrap' => ['log', 'geoip'],
```

Для обновления базы данных требуется запустить команду

```
./yii geoip

```

Желательно добавить в крон на раз в сутки.

Использование
-------------

[](#использование)

```
$range = Range::findByIp(\Yii::$app->request->userIP);

echo $range->city->city_name;
```

License
-------

[](#license)

**conquer/geoip** is released under the MIT License. See the bundled `LICENSE` for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3822d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67126642d0e8ae8837b3104dcd120f7992ed0837538a7d140914e17420eb17c2?d=identicon)[borodulin](/maintainers/borodulin)

---

Top Contributors

[![borodulin](https://avatars.githubusercontent.com/u/8121448?v=4)](https://github.com/borodulin "borodulin (17 commits)")

---

Tags

geoipyii2extensioncomponent

### Embed Badge

![Health badge](/badges/conquer-geoip/health.svg)

```
[![Health](https://phpackages.com/badges/conquer-geoip/health.svg)](https://phpackages.com/packages/conquer-geoip)
```

###  Alternatives

[nterms/yii2-mailqueue

Email queue component for yii2 that works with yii2-swiftmailer.

87129.2k2](/packages/nterms-yii2-mailqueue)[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1144.6k7](/packages/noam148-yii2-image-resize)[umanskyi31/opengraph

Created a new component for Yii2. The Open Graph component for your website

119.7k](/packages/umanskyi31-opengraph)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
