PHP code example of manka / geo-ip
1. Go to this page and download the library: Download manka/geo-ip library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
manka / geo-ip example snippets
'providers' => [
// ...
manka\GeoIP\GeoIPServiceProvider::class,
],
php artisan vendor:publish --tag=config
use GeoIP;
$location = GeoIP::lookup(); // Uses current request IP
$customLocation = GeoIP::lookup('8.8.8.8'); // Pass a specific IP
dd($location);