geocoder-php/free-geoip-provider

Geocoder FreeGeoIp adapter

Package info

github.com/geocoder-php/free-geoip-provider

Homepage

pkg:composer/geocoder-php/free-geoip-provider

Statistics

Installs: 786 725

Dependents: 8

Suggesters: 0

Stars: 14

4.6.0 2025-04-15 13:24 UTC

Requires

Suggests

None

Conflicts

None

Replaces

None

MIT 5181a785f08948ee651aa759d7cb93fa60776b91

  • William Durand <william.durand1.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-21 12:23:59 UTC


README

👁 Build Status
👁 Latest Stable Version
👁 Total Downloads
👁 Monthly Downloads
👁 Code Coverage
👁 Quality Score
👁 Software License

This is the Free GeoIp provider from the PHP Geocoder. This is a READ ONLY repository. See the main repo for information and documentation.

Provider Website: https://freegeoip.app

Usage

$httpClient = new \Http\Discovery\Psr18Client();

// Use the default provider (https://freegeoip.app)
$provider = new Geocoder\Provider\FreeGeoIp\FreeGeoIp($httpClient);
// Or provide the endpoint of your instance
$provider = new Geocoder\Provider\FreeGeoIp\FreeGeoIp($httpClient, 'http://my.internal.geocoder/json/%s');

Freegeoip.net shutdown

As per the freegeoip.net website, the provider has been purchased by IpStack. As a result, this provider no longer uses this service with the default configuration.

By default, it will now use freegeoip.app (which provides a hosted version of the same API as freegeoip.net).

You can also use the self hosted variant and supply a host when constructing the provider.

Alternatives

We offer an IpStack provider which you can use if you wish to continue with the new service owner.

Full IP Provider List

https://github.com/geocoder-php/Geocoder#ip

Install

composer require geocoder-php/free-geoip-provider

Contribute

Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.