ipinfodb.com module for the kohana framework
Kohana module for doing IP to Location lookups using the free IP Info DB service.
Before the begin obtain an API key from ipinfodb and put it to config/ipinfo.php
.
'key' => 'your ipinfodb.com API key',
By default IP information storing in a database and refreshes after cache_time
in seconds
'cache_time' => 3600*24*30,
Default fallback IP aka default city
'default_ip' => '80.247.32.206',
Enable automatic location translation (uses Google geocoding) for the current I18n::$lang
'auto_localize' => true,
Get info for remote addres and store its in $info var
$info = IpInfo::factory();
Get info for the custom IP
$info = IpInfo::factory('xxx.xx.x.y');
//or
$info->ip('xxx.xx.x.y');
Module does not use any controllers or views, does not set session or cookie values so you should implement required functionality by yourself.