PHPackages                             51degrees/fiftyone.geolocation - 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. 51degrees/fiftyone.geolocation

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

51degrees/fiftyone.geolocation
==============================

Geolocation engines for 51Degrees Pipeline API. Perform reverse geocoding using longitude and latitude to populate postal addresses.

4.5.6(4mo ago)0933EUPL-1.2PHPPHP &gt;=7.4CI passing

Since Jun 19Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/51Degrees/location-php)[ Packagist](https://packagist.org/packages/51degrees/fiftyone.geolocation)[ RSS](/packages/51degrees-fiftyonegeolocation/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (6)Versions (49)Used By (0)

51Degrees Geo-Location Engines
==============================

[](#51degrees-geo-location-engines)

[![51Degrees](https://camo.githubusercontent.com/a8f834240cead81bb56b294ca890b3c9fcb8a3cd9551e2e98697882cb23e162e/68747470733a2f2f3531646567726565732e636f6d2f4465736b746f704d6f64756c65732f46696674794f6e652f4469737472696275746f722f4c6f676f2e617368783f75746d5f736f757263653d6769746875622675746d5f6d656469756d3d7265706f7369746f72792675746d5f636f6e74656e743d726561646d655f6d61696e2675746d5f63616d706169676e3d7068702d6f70656e2d736f75726365 "Data rewards the curious")](https://camo.githubusercontent.com/a8f834240cead81bb56b294ca890b3c9fcb8a3cd9551e2e98697882cb23e162e/68747470733a2f2f3531646567726565732e636f6d2f4465736b746f704d6f64756c65732f46696674794f6e652f4469737472696275746f722f4c6f676f2e617368783f75746d5f736f757263653d6769746875622675746d5f6d656469756d3d7265706f7369746f72792675746d5f636f6e74656e743d726561646d655f6d61696e2675746d5f63616d706169676e3d7068702d6f70656e2d736f75726365) **Pipeline API**

[Developer Documentation](https://51degrees.com/location-php/index.html?utm_source=github&utm_medium=repository&utm_content=documentation&utm_campaign=php-open-source "developer documentation")

Introduction
------------

[](#introduction)

This repository contains the geo-location engines for the PHP implementation of the Pipeline API.

Pre-requesites
--------------

[](#pre-requesites)

The Pipeline engines are written in PHP and target 5 and 7.

Packages
--------

[](#packages)

- **geoLocation** - A Node.js engine which retrieves geo-location results by consuming data from the 51Degrees cloud service.
- **geoLocationPipelineBuilder** - Contains the geo-location engine builders.

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

[](#installation)

You can either reference the projects in this repository or you can reference the [Composer](https://packagist.org/packages/51degrees/fiftyone.geolocation) packages in your project:

```
"require": {
    "51degrees/fiftyone.geolocation": "@dev",
    ...

```

Make sure to select the latest version from [Composer.](https://packagist.org/packages/51degrees/fiftyone.geolocation)

#### Configuration Options

[](#configuration-options)

- String `type` - The name of the type of geolocation service to use.
- String `resourceKey` - Resource Key is evidence used within the Cloud service for monitoring usage. [Obtain a resource key](https://configure.51degrees.com).
- Array `restrictedProperties` - The properties to populate values for in the result (all are populated by default).

Examples
--------

[](#examples)

Examples can be found in the `examples` folder. See below for a list of examples.

ExampleDescriptionImplemtationgettingstarted.phpThis example uses geo-location to determine the country from a longitude and latitude.Cloudconfigurefromfile.phpThis examples creates a pipeline from a configuration file to set up geo-location.Cloudcombiningservices.phpThis example uses geo-location alongside device detection to determine the country and device.CloudwebIntegration.phpThis example demonstrates how to integrate the geo-location solution into a website.CloudEnsure the `resource_key` environment variable is set to your resource key prior to running the example scripts.

To run the examples, go to the `examples` directory and run:

`php -S localhost:8080`

The examples will now be available to view in a browser. For example, the cloud getting started example will be available by browsing to `localhost:8080/cloud/gettingstarted.php`.

Tests
-----

[](#tests)

In this repository, there are tests using phpunit. You will need to install the package dependencies to run them:

`composer install`

To run the tests, then call:

`phpunit --fail-on-warning --display-warnings --log-junit test-results.xml`

Project documentation
---------------------

[](#project-documentation)

For complete documentation on the Pipeline API and associated engines, see the [51Degrees documentation site](https://51degrees.com/documentation/index.html).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~172 days

Total

47

Last Release

122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f732dbc1c4b746fb5b9128b87cabfa34bf535f1de1b98ed712567288e58b5ff8?d=identicon)[51degrees](/maintainers/51degrees)

---

Top Contributors

[![Automation51D](https://avatars.githubusercontent.com/u/60396166?v=4)](https://github.com/Automation51D "Automation51D (50 commits)")[![ben51degrees](https://avatars.githubusercontent.com/u/14220556?v=4)](https://github.com/ben51degrees "ben51degrees (28 commits)")[![lukareihl](https://avatars.githubusercontent.com/u/133642598?v=4)](https://github.com/lukareihl "lukareihl (24 commits)")[![pi-alexander-popel](https://avatars.githubusercontent.com/u/74662418?v=4)](https://github.com/pi-alexander-popel "pi-alexander-popel (17 commits)")[![Steve51D](https://avatars.githubusercontent.com/u/24695848?v=4)](https://github.com/Steve51D "Steve51D (16 commits)")[![justadreamer](https://avatars.githubusercontent.com/u/341967?v=4)](https://github.com/justadreamer "justadreamer (6 commits)")[![Joseph51D](https://avatars.githubusercontent.com/u/25739804?v=4)](https://github.com/Joseph51D "Joseph51D (4 commits)")[![FilipNest](https://avatars.githubusercontent.com/u/4625324?v=4)](https://github.com/FilipNest "FilipNest (3 commits)")[![Jamesr51d](https://avatars.githubusercontent.com/u/122470673?v=4)](https://github.com/Jamesr51d "Jamesr51d (1 commits)")

---

Tags

geocodinggeolocationlocationlatitudelongitude51degrees

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/51degrees-fiftyonegeolocation/health.svg)

```
[![Health](https://phpackages.com/badges/51degrees-fiftyonegeolocation/health.svg)](https://phpackages.com/packages/51degrees-fiftyonegeolocation)
```

###  Alternatives

[anthonymartin/geo-location

Powerful GeoCoding library: Retrieve bounding box coordinates, distances between geopoints, point in polygon, get longitude and latitude from addresses and more with GeoLocation for PHP

196949.5k5](/packages/anthonymartin-geo-location)[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[torann/geoip

Support for multiple Geographical Location services.

2.2k14.2M76](/packages/torann-geoip)[toin0u/geotools

Geo-related tools PHP 7.3+ library

1.4k1.3k](/packages/toin0u-geotools)[php-coord/php-coord

PHPCoord is a PHP library to aid in handling coordinates. It can convert coordinates for a point from one system to another and also calculate distance between points.

110914.5k12](/packages/php-coord-php-coord)[data-values/geo

Geographical value objects, parsers and formatters

20631.0k18](/packages/data-values-geo)

PHPackages © 2026

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