anybody/ripe-geoip 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-13