PHP code example of snapshotpl / zf-snap-geoip

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

    

snapshotpl / zf-snap-geoip example snippets


$record = $this->getServiceLocator()->get('geoip')->getRecord();
echo $record->getCity();

$record = $this->getServiceLocator()->get('geoip')->getRecord('216.239.51.99');
echo $record->getLongitude();
echo $record->getLatitude();

 echo $this->geoip() 

 echo $this->geoip('184.106.35.179')->getCountryName() 

 echo $this->geoip($user)->getTimezone() 

php index/public.php geoip download

php public/index.php geoip download