PHP code example of webazon / ipinfo
1. Go to this page and download the library: Download webazon/ipinfo 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/ */
webazon / ipinfo example snippets
use Webazon\Ipinfo\Ipinfo;
use Webazon\Ipinfo\Exception;
If the IP address parameter is not provided, it returns the visitor's IP data.
$locale = $ipinfo -> locale;
$ipinfo=json_encode($ipinfo,JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);