PHPackages                             foxliscom/geo - 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. foxliscom/geo

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

foxliscom/geo
=============

Get user location by IP using Foxlis Geo API: city, country, subdivisions, continent, etc

v1.0.5(5y ago)0221MITPHPPHP &gt;=5.6.2

Since Mar 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/FoxlisCom/Geo)[ Packagist](https://packagist.org/packages/foxliscom/geo)[ RSS](/packages/foxliscom-geo/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

Credits
-------

[](#credits)

This plug-in use [Foxlis Geo API](https://foxlis.com/geo).

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

[](#installation)

Require `foxliscom/geo` using composer.

Usage
-----

[](#usage)

```
use Foxliscom\Geo\FoxlisGeo;

// Get City
echo FoxlisGeo::location()->getCity();

// Get Country
echo FoxlisGeo::location()->getCountry();

// Get Continent
echo FoxlisGeo::location()->getContinent();

// Get Subdivisions List
$subdivisions = FoxlisGeo::location()->getSubdivisions();

// Get Location Data
$locationData = FoxlisGeo::location()->getLocation();

// Get Accuracy Radius
echo $locationData->getAccuracyRadius();

// Get Latitude
echo $locationData->getLatitude();

// Get Longitude
echo $locationData->getLongitude();

// Get Time Zone
echo $locationData->getTimeZone();

// Get Account Info
FoxlisGeo::account()->getData();
```

Multilanguage example:

```
// Russian
echo FoxlisGeo::location()->getCity()->ru;

// Spanish
echo FoxlisGeo::location()->getCity()->es;

// English
echo FoxlisGeo::location()->getCity()->en;

// German
echo FoxlisGeo::location()->getCity()->de;

// French
echo FoxlisGeo::location()->getCity()->fr;

// Japanese
echo FoxlisGeo::location()->getCity()->ja;

// Portuguese
echo FoxlisGeo::location()->getCity()->ptBR;

// Chinese
echo FoxlisGeo::location()->getCity()->zhCN;
```

Configuration
-------------

[](#configuration)

If you need to configure this plug-in - declare a global function `getFoxlisGeoConfig` with params like in common config `src/Config/common.php`:

```
function getFoxlisGeoConfig()
{
    return [
        // Your params here
    ];
}
```

- `foxlis_geo_field_language` - default language `default en`.
    - English `en`
    - Chinese `zh-CN`
    - French `fr`
    - Russian `ru`
    - German `de`
    - Spanish `es`
    - Japanese `ja`
    - Portuguese `pt-BR`
- `foxlis_geo_field_session` - save result to user session `default true`.
- `foxlis_geo_field_bot_filter` - don't detect geo-location for bots `default true`.
- `foxlis_geo_field_protocol` - protocol "http" or "https" `default "http"`.
- `foxlis_geo_field_development_fake_ip_enable` - use fake ip for development `default false`.
- `foxlis_geo_field_development_fake_ip` - fake ip value `default "23.55.115.223"`.
- `foxlis_geo_field_account` - [account key](https://foxlis.com/geo/activation) to get account info.
- `foxlis_geo_bots_list` - bots list (for matching in the `$_SERVER['HTTP_USER_AGENT']`).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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 ~1 days

Total

6

Last Release

1933d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3691760?v=4)[Boguslaw Lis](/maintainers/foxlis)[@foxlis](https://github.com/foxlis)

---

Top Contributors

[![niko-ros](https://avatars.githubusercontent.com/u/62051614?v=4)](https://github.com/niko-ros "niko-ros (23 commits)")

---

Tags

citycontinentcountrygeolocationgeolocation-apiip-locationlocationsubdevisionsgeolocationlocationgeocountrycityip-locationcontinentsubdevisionsfoxlis

### Embed Badge

![Health badge](/badges/foxliscom-geo/health.svg)

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

###  Alternatives

[torann/geoip

Support for multiple Geographical Location services.

2.2k15.3M98](/packages/torann-geoip)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k8.5M90](/packages/stevebauman-location)[zoujingli/ip2region

ip2region v3.0 for PHP - 企业级 IP 地理位置查询库，支持 IPv4 和 IPv6，多种缓存策略，零依赖，开箱即用

1.4k475.0k67](/packages/zoujingli-ip2region)[kartik-v/yii2-ipinfo

An IP address information display widget for Yii 2.0 with country flag and geo position info.

2833.6k1](/packages/kartik-v-yii2-ipinfo)[hibit-dev/geodetect

Automatically detect user's geo data based on their IP address

2322.8k](/packages/hibit-dev-geodetect)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

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

PHPackages © 2026

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