PHP code example of kagatan / ip-api

1. Go to this page and download the library: Download kagatan/ip-api 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/ */

    

kagatan / ip-api example snippets




use Kagatan\IpAPI;

$info = IpAPI::info($_SERVER['REMOTE_ADDR']);
var_dump(info);