Get IP address information from multi geoip providers
najibismail/multigeoip is a Laravel package for get ip address information from multi geoip providers.
It currently has 0 GitHub stars and 1.374 downloads on Packagist (latest version v1.0.9).
Install it with composer require najibismail/multigeoip.
Discover more Laravel packages by najibismail
or browse all Laravel packages to compare alternatives.
Last updated
Get IP address information from multi providers
To install through composer by using the following command:
composer require najibismail/multigeoip
php artisan multigeoip:publish
php artisan multigeoip:maxmind-db
use Najibismail\MultiGeoip\Facades\Multigeoip;
// Auto get an IP Address
$ip_info = Multigeoip::ip();
// [OR]
// Set the IP Address
$ip_info = Multigeoip::ip('{IP ADDRESS}');
// Get the IP Address details
$ip_info->all();
$ip_info->getIp();
$ip_info->getCountryCode();
$ip_info->getCountry();
$ip_info->getCity();
$ip_info->getZipCode();
$ip_info->getState();
$ip_info->getTimezone();
// Auto get an IP Address
$ip_info = multigeoip();
// [OR]
// Set the IP Address
$ip_info = multigeoip('{IP ADDRESS}');
// Get the IP Address details
$ip_info->all();
$ip_info->getIp();
$ip_info->getCountryCode();
$ip_info->getCountry();
$ip_info->getCity();
$ip_info->getZipCode();
$ip_info->getState();
$ip_info->getTimezone();
MultiGeoIP uses the GeoLite database from MaxMind. Use of MultiGeoIP services making use of geolocation data is under condition of acceptance of the Creative Commons Attribution-ShareAlike 3.0 Unported License. The attribution requirement may be met by including the following in all advertising and documentation mentioning features of or use of this database:
This product includes GeoLite data created by MaxMind, available from
<a href="http://www.maxmind.com">http://www.maxmind.com</a>.
The MIT License (MIT). Please see License File for more information.