承接 munna/iplocation 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

munna/iplocation

Composer 安装命令:

composer require munna/iplocation

包简介

Geo Location Tracking By IP address. Its providing more flexible information about any country.. Its completely free and open source.

README 文档

README

Ip Location Tracking

Tracking location info by ip address.

Installing IpLocaiton

Next, run the Composer command to install the latest stable version:

composer require munna/iplocation

Create A Class Instance

to create a class instance

// Use this as namespace
use Munna\IpLocation\IpLocation;

// Set Your Ip Address
$ip = "YOUR_IP_ADDRESS";

//this is optional. Find this api key by visiting https://ipinfo.io/account/home?service=google&loginState=create
$api_key = "API_TOKEN"; 

//If you have this api_key 
$location = new IpLocation($ip, $api_key);

// If you do not have this api_key pass only ip
$location = new IpLocation($ip);

// Finally init the class
$location->init();

After init class instance. You will be get the all of these data.

Provided Data

// Get Ip Address
$ip = $location->ip;

//full info as an array
$info = $location->info();

// get region name
$region = $location->region;

// get country
$country = $location->country;

// get city name If you set api_key when create instance
$cityName = $location->city;

// get ioc name
$loc = $location->loc;

// get postal
$postal = $location->postal;

// get flag url
$flag = $location->flag;

// get timeZone
$timeZone = $location->timeZone;

JSON data sample For All Info

{
    "ip": "27.147.201.241",
    "hostname": "dhknat-27.147.201.241.link3.net",
    "city": "Dhaka",
    "country": "BD",
    "region": "Dhaka",
    "loc": "23.7104,90.4074",
    "postal": "1000",
    "org": "AS23688 Link3 Technologies Ltd.",
    "flag": "https://raw.githubusercontent.com/MunnaAhmed/Flags/main/bd.png"
}

License

This package is open-sources and licensed under the MIT license.

Thank you very much. Please give a star.

munna/iplocation 适用场景与选型建议

munna/iplocation 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 121 次下载、GitHub Stars 达 6, 最近一次更新时间为 2021 年 01 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「iplocation」 「LocationByIp」 「PhpIpLocation」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 munna/iplocation 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 munna/iplocation 我们能提供哪些服务?
定制开发 / 二次开发

基于 munna/iplocation 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-12