PHPackages                             indeximstudio/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. indeximstudio/sypexgeo

ActiveLibrary

indeximstudio/sypexgeo
======================

A PHP package for working with the SypexGeo database file.

v3.0.0(5y ago)011MITPHPPHP ^8.0

Since Feb 1Pushed 5y agoCompare

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

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

SypexGeo PHP API
================

[](#sypexgeo-php-api)

[![Latest stable version](https://camo.githubusercontent.com/36cbf013f8a2d75787ce41da268e15491ae3e1f25dcfaff4cd247e5f63894409/68747470733a2f2f706f7365722e707567782e6f72672f6573656174682f737970657867656f2f762f737461626c65)](https://packagist.org/packages/eseath/sypexgeo)[![Build Status](https://camo.githubusercontent.com/8fd5df0e21d782fd2e3c29d57a302caefda237021ff39e7da96a5c893a50af69/68747470733a2f2f7472617669732d63692e6f72672f4573656174682f737970657867656f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Eseath/sypexgeo)

A PHP package for working with the [SypexGeo](https://sypexgeo.net) database file.

The current version supports Laravel 5.5 and later. If you need support Laravel 5.4 or older, see version 1.\*.

Installation for Laravel &gt;=5.5
---------------------------------

[](#installation-for-laravel-55)

1\. Add the package through composer:

```
composer require eseath/sypexgeo

```

2\. Publish config `sxgeo.php` (optionally):

```
php artisan vendor:publish --provider="Eseath\SxGeo\SxGeoServiceProvider"

```

By default in config specified URL to the database of cities. If you want the database of countries, change url:

```
...
    'dbFileURL' => 'https://sypexgeo.net/files/SxGeoCountry.zip',
...

```

3\. Download the database file:

```
php artisan sxgeo:update

```

You can use this command to upgrade database to the current version via CRON.

Also you can download the database manually:

- [Сountries](https://sypexgeo.net/files/SxGeoCountry.zip)
- [Сities](https://sypexgeo.net/files/SxGeoCity_utf8.zip)

Usage
-----

[](#usage)

```
use Eseath\SxGeo\SxGeo;

$sxGeo = new SxGeo('/path/to/database/file.dat');
$fullInfo  = $sxGeo->getCityFull($ip)
$briefInfo = $sxGeo->get($ip);
```

### With Laravel

[](#with-laravel)

```
use SxGeo;

$data = SxGeo::getCityFull($ip);
```

Example Data
------------

[](#example-data)

```
array:3 [▼
    "city" => array:5 [▼
        "id" => 524901
        "lat" => 55.75222
        "lon" => 37.61556
        "name_ru" => "Москва"
        "name_en" => "Moscow"
    ]
    "region" => array:4 [▼
        "id" => 524894
        "name_ru" => "Москва"
        "name_en" => "Moskva"
        "iso" => "RU-MOW"
    ]
    "country" => array:6 [▼
        "id" => 185
        "iso" => "RU"
        "lat" => 60
        "lon" => 100
        "name_ru" => "Россия"
        "name_en" => "Russia"
    ]
]

```

```
array:2 [▼
    "city" => array:5 [▼
        "id" => 524901
        "lat" => 55.75222
        "lon" => 37.61556
        "name_ru" => "Москва"
        "name_en" => "Moscow"
    ]
    "country" => array:2 [▼
        "id" => 185
        "iso" => "RU"
    ]
]

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~177 days

Recently: every ~197 days

Total

9

Last Release

1968d ago

Major Versions

v1.1.0 → v2.0.02018-04-22

v2.0.4 → v3.0.02020-12-23

PHP version history (3 changes)v1.0.0PHP &gt;=5.6.4

v2.0.0PHP ^7.0

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2ad9adbe607d6fb5f6c48122e812c541660d4bb79c2318669eadcf73c6fd64c?d=identicon)[indeximstudio](/maintainers/indeximstudio)

---

Top Contributors

[![Eseath](https://avatars.githubusercontent.com/u/4947716?v=4)](https://github.com/Eseath "Eseath (8 commits)")[![foxcoonn](https://avatars.githubusercontent.com/u/16428395?v=4)](https://github.com/foxcoonn "foxcoonn (3 commits)")

---

Tags

laravelgeoipgeosypexgeosxgeo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/indeximstudio-sypexgeo/health.svg)

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

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[torann/geoip

Support for multiple Geographical Location services.

2.2k14.2M76](/packages/torann-geoip)[eseath/sypexgeo

A PHP package for working with the SypexGeo database file.

13176.3k](/packages/eseath-sypexgeo)[toin0u/geotools-laravel

Geo-related tools PHP library for Laravel 4 &amp; 5

250388.0k1](/packages/toin0u-geotools-laravel)[akuechler/laravel-geoly

Perform fast and efficient radius searches on your Laravel Eloquent models.

4258.3k](/packages/akuechler-laravel-geoly)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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