anybody / ripe-geoip
Its Laravel package for check ip addresses by ripe database
Requires
- php: ^8.1
- ext-intl: *
- laravel/framework: 11.*
This package is auto-updated.
Last update: 2025-06-13 16:23:49 UTC
README
Description
This package provides an ability for check ip by Ripe database web services
Install via Composer
We recommend installing this package with Composer.
Download Composer
To download Composer, run in the root directory of your project:
curl -sS https://getcomposer.org/installer | php
You should now have the file composer.phar
in your project directory.
Install Dependencies
Run in your project root:
php composer.phar require anybody/ripe-geoip
You should now have the files composer.json
and composer.lock
as well as
the directory vendor
in your project directory. If you use a version control
system, composer.json
should be added to it.
IP Geolocation Usage
IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a Ripe database or web service should not be used to identify a particular address or household.
Database Reader
Usage
use Anybody\RipeGeoip\Services\RipeClient;
class WhoIs
{
public function index()
{
return RipeClient::getCountryCode(request()->ip())
}
}
Country Example
use Anybody\RipeGeoip\Services\RipeClient;
class WhoIs
{
public function index()
{
return RipeClient::getCountry(request()->ip())
}
}