daxslab/yii2-ipstack
Composer 安装命令:
composer require daxslab/yii2-ipstack
包简介
Locate and identify website visitors by IP address
README 文档
README
Locate and identify website visitors by IP address using IPStack API
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist daxslab/yii2-ipstack "*"
or add
"daxslab/yii2-ipstack": "*"
to the require section of your composer.json file.
Configuration
Add the component to the application:
'components' => [ 'ipStack' => [ 'class' => \daxslab\ipstack\Client::class, 'api_key' => '{YOUR_API_KEY}', ], ]
Usage
Request info about current user IP
Yii::$app->ipStack->getData();
Request info about a custom IP
Yii::$app->ipStack->getData($ip);
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-22