PHPackages                             faridbabayev/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. [API Development](/categories/api)
4. /
5. faridbabayev/geoip

ActiveLibrary[API Development](/categories/api)

faridbabayev/geoip
==================

This package provides an API for the ReallyFreeFeoip

v1.0.0(5y ago)23MITPHPPHP ^7.1

Since Sep 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Faridbabayev001/geoip)[ Packagist](https://packagist.org/packages/faridbabayev/geoip)[ Docs](https://github.com/faridbabayev/geoip)[ RSS](/packages/faridbabayev-geoip/feed)WikiDiscussions master Synced today

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

PHP library to work with [ReallyFreeFeoip](https://reallyfreegeoip.org/)
========================================================================

[](#php-library-to-work-with-reallyfreefeoip)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e7b01183be4d7e0dbab6ed6e61b942e4f7c9a3740df4f58576c3ed3fc3eddd8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661726964626162617965762f67656f69702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/faridbabayev/geoip)[![Build Status](https://camo.githubusercontent.com/cdfec6fdf46d3d2fb0bbd76c12ad8518cba6b59c455a1eea5f50a9bc675f9020/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6661726964626162617965762f67656f69702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/faridbabayev/geoip)[![Quality Score](https://camo.githubusercontent.com/a6fc3c9c8d14e66d27f414d0bc7a26c00323b9279b6692efc4ecd73f4c788856/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6661726964626162617965762f67656f69702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/faridbabayev/geoip)[![Total Downloads](https://camo.githubusercontent.com/829870e256b55250300bfa535d1a4d5c2df40dc6fc6874bbd187f7166fe14102/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6661726964626162617965762f67656f69702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/faridbabayev/geoip)

This package provides an API for the [ReallyFreeFeoip](https://reallyfreegeoip.org/)

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

[](#installation)

You can install the package via composer:

```
composer require faridbabayev/geoip
```

Usage
-----

[](#usage)

```
use FaridBabayev\Geoip\Geoip;

$geoip = new Geoip(); // this will fetch ip geolocation for server ip address
$geoip = new Geoip('75.197.224.3'); // this will ip geolocation for 75.197.224.3
```

You can get ip geolocation by accessing

```
$geoip = new Geoip();
$geoip->ip;  //return ip address
$geoip->country_code;  // return country code
$geoip->country_name;  // return country name
$geoip->region_code;  // return region code
$geoip->city;  // return city
$geoip->zip_code;  // return zip_code
$geoip->time_zone;  // return time zone
$geoip->latitude;  // return latitude
$geoip->metro_code;  // return metro_code
```

You can change ip address for a new ip geolocation by calling `for()` method without instantiating new class:

```
$geoip = new Geoip();
$geoip->for('75.197.224.3');
$geoip->country_code;  // return country code
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Farid Babayev](https://github.com/Faridbabayev001)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

2055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c1324ec5112e57f66e32e4b9719f134e86204264a5d7c56ba7a0b4b1af8e183?d=identicon)[Farid Babayev](/maintainers/Farid%20Babayev)

---

Tags

geoipIPlocationfaridbabayev

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M293](/packages/geoip2-geoip2)[stevebauman/location

Retrieve a user's location by their IP Address

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

PHPackages © 2026

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