PHPackages                             calderawp/location - 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. calderawp/location

ActiveLibrary[API Development](/categories/api)

calderawp/location
==================

Get GeoIP data via IP

017PHP

Since Aug 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/CalderaWP/location)[ Packagist](https://packagist.org/packages/calderawp/location)[ RSS](/packages/calderawp-location/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ip to GeoIP Utility
===================

[](#ip-to-geoip-utility)

Turns an IP address into GeoIP data.

**Requires PHP7**

Install
-------

[](#install)

`composer require calderawp/location`

Usage
-----

[](#usage)

Find IP via  :

```
    	$geo = new FreeGEOIP( '1.2.3.5' );
    	$geo->query();
    	$location = $geo->get_location();

```

Free GEOIP is rate limitted, you can deploy your own instance. But then you will need to write your own handler class. Here is an example, assuming your API is at `http://HiRoy.club/geo` :

```
    	class MyGeoIP extends GEOIP
    	{

    		/**
    		 * @inheritdoc
    		 */
    		protected function apiRoot() : string
    		{
    			return 'http://HiRoy.club/geo/json/';
    		}

    		/**
    		 * @inheritdoc
    		 */
    		protected function getApiUrl( string  $ip ) : string
    		{
    			return $this->apiRoot() . $ip;
    		}
    	}

```

### Copyright 2016 CalderaWP LLC &amp; Josh Pollock. Licensed under the terms of the GNU GPL version 2 or later. Please share with your neighbor.

[](#copyright-2016-calderawp-llc--josh-pollock-licensed-under-the-terms-of-the-gnu-gpl-version-2-or-later-please-share-with-your-neighbor)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![Shelob9](https://avatars.githubusercontent.com/u/1994311?v=4)](https://github.com/Shelob9 "Shelob9 (2 commits)")

### Embed Badge

![Health badge](/badges/calderawp-location/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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