PHPackages                             oleg-chulakov-studio/yii2-sypexgeo - 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. oleg-chulakov-studio/yii2-sypexgeo

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

oleg-chulakov-studio/yii2-sypexgeo
==================================

Sypexgeo Yii2 component

2.0.2(5y ago)14.6k2BSD-3-ClausePHPPHP ^7.1.0

Since Aug 19Pushed 5y ago5 watchersCompare

[ Source](https://github.com/OlegChulakovStudio/yii2-sypexgeo)[ Packagist](https://packagist.org/packages/oleg-chulakov-studio/yii2-sypexgeo)[ RSS](/packages/oleg-chulakov-studio-yii2-sypexgeo/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Yii 2 Sypexgeo Component
========================

[](#yii-2-sypexgeo-component)

На основе функционала .

Sypex Geo - product for location by IP address. Obtaining the IP address, Sypex Geo outputs information about the location of the visitor - country, region, city, geographical coordinates and other in Russian and in English. Sypex Geo use local compact binary database file and works very quickly. For more information visit:

Поставляется вместе со справочниками Sypexgeo [https://sypexgeo.net/files/SxGeo\_Info.zip](https://sypexgeo.net/files/SxGeo_Info.zip) от 18.05.2017. При изменении справочников следует вручную скачать их и поместить в папку `vendor/chulakov/yii2-sypexgeo/src/migrations/data`. Перечень файлов:

```
city.tsv
region.tsv
country.tsv

```

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

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

- Для подключения компонента необходимо добавить в `composer.json` следующие строки:

```
"require": {
    "oleg-chulakov-studio/yii2-sypexgeo": "~1.0.0"
}

```

- Добавить новый контроллер в конфигурационный файл консольной части приложения.

```
'controllerMap' => [
    ...
    'sypexgeo' => [
        'class' => 'chulakov\sypexgeo\console\controllers\SypexgeoController',
        'importOptions' => [
            'sourceUrl' => 'https://sypexgeo.net/files',  // URL адрес сервера, на котором лежат .dat файлы
            'infoMode' => true,                           // Флаг необходимости вывода информационных сообщений в stdout
            'dataDir' => '@app/runtime/sypexgeo',     // Относительный путь к каталогу, куда сохранять файлы .dat
        ],
    ]
]

```

- Добавление переводов

```
'i18n' => [
    'translations' => [
        'ch/sypexgeo' => [
            'class' => 'yii\i18n\PhpMessageSource',
            'basePath' => '@vendor/oleg-chulakov-studio/yii2-sypexgeo/src/messages',
            'sourceLanguage' => 'en-US',
        ],
    ],
],

```

- Выполнить миграции командой

```
php yii migrate --migrationPath=@vendor/oleg-chulakov-studio/yii2-sypexgeo/src/migrations

```

- Выполнить импорт файлов .dat с помощью команды

```
php yii sypexgeo/import

```

В дальнейшем данную команду можно использовать для запуска в `cron`. Команда имеет необязательный параметр `type`, указав который можно скачать требуемый ZIP файл:

```
'country'     ->  'SxGeoCountry.zip'
'city_cp1251' ->  'SxGeoCity_cp1251.zip'
'city_utf8'   ->  'SxGeoCity_utf8.zip'

```

- Добавить компонент в параметры приложения

```
'components' => [
    ...
    'sypexgeo' => [
        'class' => 'chulakov\sypexgeo\Sypexgeo',
        'dataFile' => '@app/runtime/sypexgeo/SxGeoCity.dat',     // Относительный путь к файлу .dat
    ]
],

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

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

Every ~422 days

Total

2

Last Release

2037d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7cb11be37853072fe7ab807b40211e2c135bc04bf5c7c79d9c523dc4022ed2d?d=identicon)[Oleg Chulakov Studio](/maintainers/Oleg%20Chulakov%20Studio)

---

Top Contributors

[![ikchulakov](https://avatars.githubusercontent.com/u/32455466?v=4)](https://github.com/ikchulakov "ikchulakov (7 commits)")

### Embed Badge

![Health badge](/badges/oleg-chulakov-studio-yii2-sypexgeo/health.svg)

```
[![Health](https://phpackages.com/badges/oleg-chulakov-studio-yii2-sypexgeo/health.svg)](https://phpackages.com/packages/oleg-chulakov-studio-yii2-sypexgeo)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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