najibismail/multigeoip

Get IP address information from multi geoip providers
1,376
Install
composer require najibismail/multigeoip
Latest Version:v1.0.9
PHP:^7.0|^8.0
Laravel:6 · 7 · 8
License:MIT
Last Updated:Jan 1, 2022
Links: GitHub  ·  Packagist
Maintainer: najibismail

Multi GeoIP

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Get IP address information from multi providers

Requirements

  • PHP: ^7.0
  • Laravel: ~6.0,~7.0,~8.0

Installation

To install through composer by using the following command:

composer require najibismail/multigeoip

Publish Config File

php artisan multigeoip:publish

Download Free Maxmind DB

php artisan multigeoip:maxmind-db

Usage

Facade

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();

Helper


// 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();

Disclaimer

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>.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

d3catalyst/l4-geoip

Laravel 4 Library for detecting geogpraphical location info.

2,716 4
code-orange/lumen-geoip

GeoIP for Lumen

8,762 2
larva/laravel-geoip

GeoIP Extension for Laravel.

1,008 2
simon80119/lumen-geoip

GeoIP for Lumen

155 0

Version History

Version Released PHP Laravel License
v1.0.9 ^7.0|^8.0 ^6.0|^7.0|^8.0 MIT
v1.0.8 ^7.0|^8.0 ^7.0|^8.0 MIT
v1.0.7 ^7.0|^8.0 ^7.0|^8.0 MIT
v1.0.6 ^7.0|^8.0 ^7.0|^8.0 MIT
v1.0.5 ^7.0|^8.0 MIT