PHP code example of himiklab / yii2-ipgeobase-component

1. Go to this page and download the library: Download himiklab/yii2-ipgeobase-component 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/ */

    

himiklab / yii2-ipgeobase-component example snippets


'components' => [
    'ipgeobase' => [
        'class' => 'himiklab\ipgeobase\IpGeoBase',
        'useLocalDB' => true,
    ],
    // ...
],

var_dump(Yii::$app->ipgeobase->getLocation('144.206.192.6'));
var_dump(Yii::$app->ipgeobase->getLocation('144.206.192.6', false));

php composer.phar