PHP code example of cyber-duck / laravel-maxmind-geolocate
1. Go to this page and download the library: Download cyber-duck/laravel-maxmind-geolocate 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/ */
cyber-duck / laravel-maxmind-geolocate example snippets
use CyberDuck\GeoLocate\Facades\GeoLocate;
$result = GeoLocate::country('1.2.3.4');
// $result is an instance of \GeoIp2\Record\Country
$result->isoCode // == 'GB' for example.