From 5693c5d63b0bd668734e95a051847f1054bbf5de Mon Sep 17 00:00:00 2001 From: Dzmitry Saniuk <32801067+scorpsan@users.noreply.github.com> Date: Sat, 21 Apr 2018 11:13:24 +0300 Subject: [PATCH] Update README.md --- README.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e420b6a..8f12111 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,87 @@ Get User Ip: var_dump(Yii::$app->geoIp->ip); ``` +## Return Data + +```php +Online + * Returned information by IP address with following paramters: + * - `ip` - Visitor IP address, or IP address specified as parameter. + * - `city` - Object Region information + * -- [id] => 625144 + * -- [lat] => 53.9 + * -- [lon] => 27.56667 + * -- [name_ru] => Минск + * -- [name_en] => Minsk + * -- [name_de] => Minsk + * -- [name_fr] => Minsk + * -- [name_it] => Minsk + * -- [name_es] => Minsk + * -- [name_pt] => Minsk + * -- [okato] => 5000000000 + * -- [vk] => 282 + * -- [population] => 1742124 + * - `region` - Object Region information + * -- [id] => 625143 + * -- [lat] => 53.9 + * -- [lon] => 27.57 + * -- [name_ru] => Минск + * -- [name_en] => Horad Minsk + * -- [name_de] => Minsk + * -- [name_fr] => Minsk + * -- [name_it] => Minsk + * -- [name_es] => Minsk + * -- [name_pt] => Minsk + * -- [iso] => BY-HM + * -- [timezone] => Europe/Minsk + * -- [okato] => 5 + * -- [auto] => 7 + * -- [vk] => 0 + * -- [utc] => 3 + * - `country` - Object Country information + * -- [id] => 36 + * -- [iso] => BY + * -- [continent] => EU + * -- [lat] => 53 + * -- [lon] => 28 + * -- [name_ru] => Беларусь + * -- [name_en] => Belarus + * -- [name_de] => Weißrussland + * -- [name_fr] => Biélorussie + * -- [name_it] => Bielorussia + * -- [name_es] => Bielorrusia + * -- [name_pt] => Bielorrússia + * -- [timezone] => Europe/Minsk + * -- [area] => 207600 + * -- [population] => 9685000 + * -- [capital_id] => 625144 + * -- [capital_ru] => Минск + * -- [capital_en] => Minsk + * -- [cur_code] => BYR + * -- [phone] => 375 + * -- [neighbours] => PL,LT,UA,RU,LV + * -- [vk] => 3 + * -- [utc] => 3 + * - `error` - Error data. + * - `request` - Request code. + * - `created` - Date create info in dstsbase. + * - `timestamp` - Timestanp request. + * + * @return array|false + */ +``` + +```php +Offline + * Returned information by IP address with following paramters: + * - `ipAddress` - Visitor IP address, or IP address specified as parameter. + * - `countryName` - Name Country in English. + * - `countryCode` - Two-letter ISO 3166-1 alpha-2 country code. + * + * @return array|false + */ +``` + ## License -yii2-widget-cropbox is released under the BSD 3-Clause License. +yii2-geoip is released under the BSD 3-Clause License.