xp-forge/geoip 问题修复 & 功能扩展

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

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

xp-forge/geoip

最新稳定版本:v5.2.0

Composer 安装命令:

composer require xp-forge/geoip

包简介

GeoIP database

关键字:

README 文档

README

Build status on GitHub XP Framework Module BSD Licence Requires PHP 7.0+ Supports PHP 8.0+ Latest Stable Version

This API allows working with data geoips of different kinds in a functional style, e.g. map/reduce.

Examples

use com\maxmind\geoip\GeoIpDatabase;
use io\File;

$database= GeoIpDatabase::open(new File('GeoLite2-City.mmdb'));
$record= $database->lookup('8.8.8.8');
$database->close();

// $record= com.maxmind.geoip.Record@{
//   [city        ] com.maxmind.geoip.Name(#5375480: Mountain View)
//   [country     ] com.maxmind.geoip.Name(#6252001: United States; code= US)
//   [continent   ] com.maxmind.geoip.Name(#6255149: North America; code= NA)
//   [postalCode  ] "94035"
//   [location    ] com.maxmind.geoip.Location(37.386,-122.0838; tz= America/Los_Angeles)
//   [subdivisions] [com.maxmind.geoip.Name(#5332921: California; code= CA)]
// }

See also

统计信息

  • 总下载量: 640
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-02-10