anybody/ripe-geoip
Composer 安装命令:
composer require anybody/ripe-geoip
包简介
Its Laravel package for check ip addresses by ripe database
README 文档
README
Description
This package provides an ability for check ip by Ripe database web services
Install via Composer
We recommend installing this package with Composer.
Download Composer
To download Composer, run in the root directory of your project:
curl -sS https://getcomposer.org/installer | php
You should now have the file composer.phar in your project directory.
Install Dependencies
Run in your project root:
php composer.phar require anybody/ripe-geoip
You should now have the files composer.json and composer.lock as well as
the directory vendor in your project directory. If you use a version control
system, composer.json should be added to it.
IP Geolocation Usage
IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a Ripe database or web service should not be used to identify a particular address or household.
Database Reader
Usage
use Anybody\RipeGeoip\Services\RipeClient;
class WhoIs
{
public function index()
{
return RipeClient::getCountryCode(request()->ip())
}
}
Country Example
use Anybody\RipeGeoip\Services\RipeClient;
class WhoIs
{
public function index()
{
return RipeClient::getCountry(request()->ip())
}
}
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-13