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

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

popphp/pop-geo
==============

Pop Geo Component for Pop PHP Framework

2.1.0p1(9y ago)3732New BSDPHPPHP &gt;=5.4.0

Since Jul 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/popphp/pop-geo)[ Packagist](https://packagist.org/packages/popphp/pop-geo)[ Docs](http://www.popphp.org/)[ RSS](/packages/popphp-pop-geo/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

pop-geo
=======

[](#pop-geo)

[![Build Status](https://camo.githubusercontent.com/ab7ac889ec3af3cf4e9c97fcdeb79af72bd080b725d28e936f354993512b128f/68747470733a2f2f7472617669732d63692e6f72672f706f707068702f706f702d67656f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/popphp/pop-geo)[![Coverage Status](https://camo.githubusercontent.com/8fe722086b0ad063fb1ef9e252bce72cbda4ba844bba9d7bfc809ab453e02e8e/687474703a2f2f63632e706f707068702e6f72672f636f7665726167652e7068703f636f6d703d706f702d67656f)](http://cc.popphp.org/pop-geo/)

END OF LIFE
-----------

[](#end-of-life)

The `pop-geo` component v2.1.0 is now end-of-life and will no longer be supported due to lack of support for the GeoIP extension in PHP 7.

OVERVIEW
--------

[](#overview)

`pop-geo` is a component for leveraging the GeoIP databases and calculating information about IP location as well as distances between sets of longitude and latitude points.

`pop-geo` is a component of the [Pop PHP Framework](http://www.popphp.org/).

INSTALL
-------

[](#install)

Install `pop-geo` using Composer.

```
composer require popphp/pop-geo

```

BASIC USAGE
-----------

[](#basic-usage)

If the GeoIP extension and databases are installed, it will autodetect information based on the IP.

```
use Pop\Geo\Geo;

$nola = new Geo();

echo $nola->getLatitude();  // 29.9546500
echo $nola->getLongitude(); // -90.0750700
```

##### Calculate the distance between to sets of points

[](#calculate-the-distance-between-to-sets-of-points)

You can give it a second set of coordinates to calculate the distance between them:

```
$houston = new Geo([
    'latitude'  => 29.7632800,
    'longitude' => -95.3632700
]);

echo $nola->distanceTo($houston);          // Outputs '317.11' miles
echo $nola->distanceTo($houston, 2, true); // Outputs '510.34' kilometers
```

You can also manually give it 2 sets of points as well:

```
use Pop\Geo\Geo;

$nola = [
    'latitude'  => 29.9546500,
    'longitude' => -90.0750700
];

$houston = [
    'latitude'  => 29.7632800,
    'longitude' => -95.3632700
];

echo Geo::calculateDistance($nola, $houston); // Outputs '317.11' miles
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

3595d ago

### Community

Maintainers

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

---

Top Contributors

[![nicksagona](https://avatars.githubusercontent.com/u/898670?v=4)](https://github.com/nicksagona "nicksagona (12 commits)")

---

Tags

phpgeoipgeopoppop php

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

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

IPIP.net officially supported IP database ipdb format parsing library

139204.2k6](/packages/ipip-db)[eseath/sypexgeo

A PHP package for working with the SypexGeo database file.

13176.3k](/packages/eseath-sypexgeo)[atchondjo/geoip2country

A lightweight but powerful IP address lookup database solution to determine visitors country

344.1k](/packages/atchondjo-geoip2country)

PHPackages © 2026

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