PHP code example of kipkaev55 / dbip

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

    

kipkaev55 / dbip example snippets






use DbIpGeo\Reader;

$geo = new Reader(
  array(
    'type' => 'mysql',
    'host' => '127.0.0.1',
    'db' => array(                   // or use 'db' => 'dbip',
        'name' => 'dbip',            //
        'city' => 'dbip_lookup',     // Optional parameter
        'isp'  => 'dbip_isp',        // Optional parameter
    ),                               //
    'user' => 'root',
    'password' => '123456'
  )
);
var_dump($geo->getGeo('94.137.26.199'));
bash
curl -sS https://getcomposer.org/installer | php

php composer.phar