dev-master
9999999-devLibrary for DB-IP
MIT
The Requires
- php >=5.4.0
by Valerii Kipkaev
0.1.1
0.1.1.0Library for DB-IP
MIT
The Requires
- php >=5.4.0
by Valerii Kipkaev
Library for DB-IP
This package provides information about the user's GEO, works with free DB-IP., (*1)
We recommend installing this package with Composer., (*2)
To download Composer, run in the root directory of your project:, (*3)
curl -sS https://getcomposer.org/installer | php
You should now have the file composer.phar
in your project directory., (*4)
Run in your project root:, (*5)
php composer.phar require kipkaev55/dbip:*
You should now have the files composer.json
and composer.lock
as well as
the directory vendor
in your project directory. If you use a version control
system, composer.json
should be added to it., (*6)
After installing the dependencies, you need to require the Composer autoloader from your code:, (*7)
require 'vendor/autoload.php';
Straightforward:, (*8)
require_once __DIR__ . '/vendor/autoload.php'; // Autoload files using Composer autoload 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'));
Library for DB-IP
MIT
Library for DB-IP
MIT