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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

freezon/sypexgeo
================

Supports GeoIP services (sypexgeo.net).

0.12(1y ago)11.1k1BSD-2-ClausePHPPHP &gt;=8.1

Since May 8Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Freezon/sypexgeo)[ Packagist](https://packagist.org/packages/freezon/sypexgeo)[ RSS](/packages/freezon-sypexgeo/feed)WikiDiscussions master Synced 1w ago

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

GeoIP for Laravel 6+ with auto discover
=======================================

[](#geoip-for-laravel-6-with-auto-discover)

---

The data comes from a database and from service

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

[](#installation)

- [SypexGeo for Laravel 6+ on Packagist](https://packagist.org/packages/freezon/sypexgeo)
- [SypexGeo for Laravel 6+ on GitHub](https://github.com/freezon/sypexgeo)

To get the latest version of SypexGeo simply require it in your `composer.json` file.

```
$ composer require freezon/sypexgeo

```

for Laravel 5.5+

```
$ composer require freezon/sypexgeo:0.8.7

```

### Publish the configurations

[](#publish-the-configurations)

Run this on the command line from the root of your project:

```
$ php artisan vendor:publish --provider="Freez0n\SypexGeo\SypexGeoServiceProvider"

```

A configuration file will be publish to `config/sypexgeo.php`

Usage
-----

[](#usage)

Getting the location data for a given IP:

```
$location = \SypexGeo::get('232.223.11.11');
```

OR

```
use Freez0n\SypexGeo\SypexGeo;

...

$location = SypexGeo::get('232.223.11.11');

// empty get for get info by user ip
$location = SypexGeo::get();

// for get city, region or country
$city = SypexGeo::getCity([$ip = '']);
$city = SypexGeo::getRegion([$ip = '']);
$city = SypexGeo::getCountry([$ip = '']);

//for get names only
$city = SypexGeo::getLocationNames([$ip = ''], [$lang = 'ru' or 'en']);
```

### Example Data

[](#example-data)

If data is received from the database - config/sypexgeo.php ('type' =&gt; 'database')

```
        [
            'city' => [
                'id' => 524901,
                'lat' => 55.75222,
                'lon' => 37.61556,
                'name_ru' => 'Москва',
                'name_en' => 'Moscow',
                'okato' => '45',
            ],
            'region' => [
                'id' => 524894,
                'lat' => 55.76,
                'lon' => 37.61,
                'name_ru' => 'Москва',
                'name_en' => 'Moskva',
                'iso' => 'RU-MOW',
                'timezone' => 'Europe/Moscow',
                'okato' => '45',
            ],
            'country' => [
                'id' => 185,
                'iso' => 'RU',
                'continent' => 'EU',
                'lat' => 60,
                'lon' => 100,
                'name_ru' => 'Россия',
                'name_en' => 'Russia',
                'timezone' => 'Europe/Moscow',
            ],
        ];
```

If data is received from the webservice - config/sypexgeo.php ( 'type' =&gt; 'web\_service', 'view' =&gt; 'json' )

```
        [
              "ip" => "77.37.136.11"
              "city" => array [
                     "id" => 524901
                     "lat" => 55.75222
                     "lon" => 37.61556
                     "name_ru" => "Москва"
                     "name_en" => "Moscow"
                     "okato" => "45"
                     "vk" => 1
                     "population" => 10381222
                  ]
              "region" => array [
                    "id" => 524894
                    "lat" => 55.76
                    "lon" => 37.61
                    "name_ru" => "Москва"
                    "name_en" => "Moskva"
                    "iso" => "RU-MOW"
                    "timezone" => "Europe/Moscow"
                    "okato" => "45"
                    "auto" => "77, 97, 99, 177, 197, 199, 777"
                    "vk" => 0
                    "utc" => 3
              ]
              "country" => array [
                    "id" => 185
                    "iso" => "RU"
                    "continent" => "EU"
                    "lat" => 60
                    "lon" => 100
                    "name_ru" => "Россия"
                    "name_en" => "Russia"
                    "timezone" => "Europe/Moscow"
                    "area" => 17100000
                    "population" => 140702000
                    "capital_id" => 524901
                    "capital_ru" => "Москва"
                    "capital_en" => "Moscow"
                    "cur_code" => "RUB"
                    "phone" => "7"
                    "neighbours" => "GE,CN,BY,UA,KZ,LV,PL,EE,LT,FI,MN,NO,AZ,KP"
                    "vk" => 1
                    "utc" => 3
              ]
              "error" => ""
              "request" => -2
              "created" => "2015.04.08"
              "timestamp" => 1428516249
        ];
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~125 days

Recently: every ~325 days

Total

16

Last Release

687d ago

PHP version history (4 changes)0.7PHP &gt;=7.1.3

0.9PHP &gt;=7.2

0.11.0PHP &gt;=8.0

0.12PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/06d8632912f0340fe244a8f67b9fe10cefcab29346b325556e9957fa35afd923?d=identicon)[FreeZ0n](/maintainers/FreeZ0n)

---

Top Contributors

[![scriptixru](https://avatars.githubusercontent.com/u/11806645?v=4)](https://github.com/scriptixru "scriptixru (10 commits)")[![Freezon](https://avatars.githubusercontent.com/u/4678813?v=4)](https://github.com/Freezon "Freezon (9 commits)")

---

Tags

laravelgeoiplaravel 9geolocationlocation

### Embed Badge

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

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

###  Alternatives

[torann/geoip

Support for multiple Geographical Location services.

2.2k14.2M76](/packages/torann-geoip)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

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

Lookup for visitor's IP information, such as country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type.

83516.9k1](/packages/ip2location-ip2location-laravel)[adrianorosa/laravel-geolocation

Laravel Geo Location package to get details for a given IP Address

6593.3k1](/packages/adrianorosa-laravel-geolocation)[midnite81/geolocation

A laravel package which wraps the IP Info DB and IP2Location Services

3624.1k](/packages/midnite81-geolocation)

PHPackages © 2026

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