PHP code example of kartik-v / yii2-ipinfo

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

    

kartik-v / yii2-ipinfo example snippets


use kartik\ipinfo\IpInfo;

echo IpInfo::widget([
    'ip' => '12.23.155.123',
    /**
     * optionally setup more options
     * refer docs for all options
     */
    // 'showFlag' => true,
    // 'showPopover' => true,
    // 'popoverOptions' => [],
    // 'flagWrapperOptions' => []
    // 'flagOptions' => []
]);