1. Go to this page and download the library: Download freezon/sypexgeo 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/ */
freezon / sypexgeo example snippets
$location = \SypexGeo::get('232.223.11.11');
use Freez0n\SypexGeo\SypexGeo;
...
$location = SypexGeo::get('232.223.11.11');
// empty get for get info by user ip
$location = SypexGeo::get();
// for get city, region or country
$city = SypexGeo::getCity([$ip = '']);
$city = SypexGeo::getRegion([$ip = '']);
$city = SypexGeo::getCountry([$ip = '']);
//for get names only
$city = SypexGeo::getLocationNames([$ip = ''], [$lang = 'ru' or 'en']);