osd/ip-lookup
最新稳定版本:1.0.2
Composer 安装命令:
composer require osd/ip-lookup
包简介
Get IP geolocation data from OSD IP Lookup microservice
README 文档
README
Framework-agnostic IP lookup library for PHP that fetches and normalizes IP metadata into rich domain objects.
This package provides a clean, reusable way to retrieve IP address metadata (ASN, network, geolocation, ownership) and expose it as strongly-typed domain objects.
It is designed to be used in any PHP environment: legacy PHP, CLI scripts, or modern frameworks.
✨ Features
- Framework-agnostic (no Laravel, no Symfony required)
- Clean Architecture / DDD-oriented design
- Strongly typed domain models (no raw arrays leaking out)
- Pluggable IP providers
- Explicit dependency injection (no hidden globals)
- Easy to test and extend
📦 Installation
composer require osd/ip-lookup
Basic Usage
use Osd\IpLookup\Bootstrap\IpLookupFactory; $service = IpLookupFactory::createDefault(); $lookup = $service->execute('79.150.204.251'); echo $lookup->ip(); echo $lookup->owner()->organization();
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-12