PHP code example of daxslab / yii2-ipstack

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

    

daxslab / yii2-ipstack example snippets


'components' => [
    'ipStack' => [
        'class' => \daxslab\ipstack\Client::class,
        'api_key' => '{YOUR_API_KEY}',
    ],
]

Yii::$app->ipStack->getData();

Yii::$app->ipStack->getData($ip);

php composer.phar