PHPackages                             sudiptpa/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sudiptpa/geoip

Abandoned → [sudiptpa/ipstack](/?search=sudiptpa%2Fipstack)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

sudiptpa/geoip
==============

A simple IP to Geo Location implementation library.

1.0.0(8y ago)34.7k1MITPHPPHP ~7.0

Since Dec 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sudiptpa/geoip)[ Packagist](https://packagist.org/packages/sudiptpa/geoip)[ RSS](/packages/sudiptpa-geoip/feed)WikiDiscussions master Synced 2w ago

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

> This package is abandoned and no longer maintained. The author suggests using the  package instead.

> \[The old freegeoip API is now deprecated and will be discontinued on July 1st, 2018\]

A simple implementation for IP to Location with  an open source platform.
-----------------------------------------------------------------------------------------------

[](#a-simple-implementation-for-ip-to-location-with-httpfreegeoipnet-an-open-source-platform)

[![Build Status](https://camo.githubusercontent.com/3bd53a24c14fa5a7c9456daff2b460adf3eaa61de2c9ca44bd06fec6fc172864/68747470733a2f2f7472617669732d63692e6f72672f73756469707470612f67656f69702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sudiptpa/geoip)[![StyleCI](https://camo.githubusercontent.com/370673a93dbf16e0ea855879fec696c875eedb371ef456c29f798f8a0f1e7f3c/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131353331393130382f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/115319108)[![Latest Stable Version](https://camo.githubusercontent.com/551e1eee02003c90997e0372d4faea2b657c4e257208c809fc325afd2f8ea05c/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f67656f69702f762f737461626c65)](https://packagist.org/packages/sudiptpa/geoip)[![Total Downloads](https://camo.githubusercontent.com/dd46a6226d988b7a5833b72ba98dab2afa4a906f0983725a02d2c20e2ac36953/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f67656f69702f646f776e6c6f616473)](https://packagist.org/packages/sudiptpa/geoip)[![License](https://camo.githubusercontent.com/5a3aa6914128ae2dc2005b1c5c25c9169ccd0a4722e957204c9cce3e0e7082f8/68747470733a2f2f706f7365722e707567782e6f72672f73756469707470612f67656f69702f6c6963656e7365)](https://packagist.org/packages/sudiptpa/geoip)

 provides a public HTTP API for software developers to search the geolocation of IP addresses. It uses a database of IP addresses that are associated to cities along with other relevant information like time zone, latitude and longitude.

You're allowed up to 15,000 queries per hour by default. Once this limit is reached, all of your requests will result in HTTP 403, forbidden, until your quota is cleared.

The freegeoip web server is free and open source so if the public service limit is a problem for you, download it and run your own instance.

### Installation

[](#installation)

You can install the package via composer: [Composer](http://getcomposer.org/).

```
composer require sudiptpa/geoip

```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

### Usage

[](#usage)

This package only supports `json` format for now.

Here are a few examples on how you can use the package:

```
  $geo = new Sujip\GeoIp\GeoIp($ip);

  $geo->country();

  $geo->city();

  $geo->region();

```

Also have a look in the [source code of `Sujip\GeoIp\GeoIp`](https://github.com/sudiptpa/geoip/blob/master/src/GeoIp.php) to discover the methods you can use.

### Changelog

[](#changelog)

Please see [CHANGELOG](https://github.com/sudiptpa/geoip/blob/master/CHANGELOG.md) for more information what has changed recently.

### Contributing

[](#contributing)

Contributions are **welcome** and will be fully **credited**.

Contributions can be made via a Pull Request on [Github](https://github.com/sudiptpa/geoip).

### Testing

[](#testing)

```
  composer test

```

### Support

[](#support)

If you are having general issues with the package, feel free to drop me and email

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/sudiptpa/geoip/issues), or better yet, fork the library and submit a pull request.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3109d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7222620?v=4)[Sujip Thapa](/maintainers/sudiptpa)[@sudiptpa](https://github.com/sudiptpa)

---

Top Contributors

[![sudiptpa](https://avatars.githubusercontent.com/u/7222620?v=4)](https://github.com/sudiptpa "sudiptpa (16 commits)")

---

Tags

geoiplocationgeoipip to location

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[torann/geoip

Support for multiple Geographical Location services.

2.2k14.9M92](/packages/torann-geoip)[stevebauman/location

Retrieve a user's location by their IP Address

1.3k8.2M84](/packages/stevebauman-location)[willdurand/geocoder

Common files for PHP Geocoder

17437.1M166](/packages/willdurand-geocoder)[ipip/db

IPIP.net officially supported IP database ipdb format parsing library

137207.1k6](/packages/ipip-db)[adrianorosa/laravel-geolocation

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

6598.6k1](/packages/adrianorosa-laravel-geolocation)[bobey/geoip2-geolite2-composer

This tiny repository aims to provide an easy solution to require GeoIP2 / GeoLite2 databases inside your project using composer.

15880.2k1](/packages/bobey-geoip2-geolite2-composer)

PHPackages © 2026

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