bupy7/yii2-telize

This package is abandoned and no longer maintained. No replacement package was suggested.

Wrapper of service offers a REST API allowing to get a visitor IP address and to query location information from any IP address.

Maintainers

Details

github.com/bupy7/yii2-telize

Source

Installs: 48

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 1

Type:yii2-extension

1.1.0 2015-10-04 08:09 UTC

This package is not auto-updated.

Last update: 2020-01-24 15:49:33 UTC


README

Extension is deprecated. More info here.

Wrapper of service offers a REST API allowing to get a visitor IP address and to query location information from any IP address. http://www.telize.com/

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bupy7/yii2-telize "*"

or add

"bupy7/yii2-telize": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

Add following code to your configuration file of application:

...
'components' => [
    ...
    'geoIp' => [
        'class' => 'bupy7\telize\GeoIp',
        'externalIp' => YII_ENV_DEV,
    ],
    ...
],
...

Get information from IP address:

var_dump(Yii::$app->geoIp->info);
// or select address
var_dump(Yii::$app->geoIp->getInfo('255.255.255.255'));
// get ip
var_dump(Yii::$app->geoIp->ip);

##License

yii2-widget-cropbox is released under the BSD 3-Clause License.