PHP code example of junstyle / geoip

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

    

junstyle / geoip example snippets


php index.php <ip_address>


$ php index.php 63.245.215.20
{"locale_code":"en","continent_code":"NA","continent_name":"North America","country_iso_code":"US","country_name":"United States","ip_address":"63.245.215.20"}