tprog/yii2-telize

Get location by IP address use telize API

dev-master / 1.0.x-dev 2015-04-10 06:33 UTC

This package is not auto-updated.

Last update: 2024-06-26 07:13:51 UTC


README

yii2-telize

Get location by IP address use telize API

http://www.telize.com/

Installation

Add in composer.json:

{
    "require": {
        "tprog/yii2-telize": "*@dev"
    }
}

Usage

<?
// ...

use tprog\telize\GeoIP;

$GeoIP = new GeoIP();

$GeoIP->request();

echo $GeoIP->longitude;
echo $GeoIP->latitude;
echo $GeoIP->continent_code;
echo $GeoIP->city;
echo $GeoIP->timezone;
echo $GeoIP->region;
echo $GeoIP->country_code;
echo $GeoIP->isp;
echo $GeoIP->country_code3;
echo $GeoIP->country;
echo $GeoIP->region_code;