PHP code example of webklex / php-geoip

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

    

webklex / php-geoip example snippets


use Webklex\GeoIP\GeoIP;

$gp = new GeoIP();

var_dump($gp->current());
var_dump($gp->get("205.13.135.36"));

use Webklex\GeoIP\GeoIP;

$gp = new GeoIP("https://my_enpoint.tld");

var_dump($gp->current());
var_dump($gp->get("205.13.135.36"));

echo 'your php code...';
shell script
composer