ip2location/ip2proxy-php-api
Composer 安装命令:
composer require ip2location/ip2proxy-php-api
包简介
PHP module to check if an IP address was being used as open proxy, web proxy, VPN anonymizer and TOR exits via IP2Proxy API.
README 文档
README
This project has been merged into IP2Proxy-PHP-Module. We will no longer maintain and support this project. Please visit IP2Proxy-PHP-Module for latest updates or enhancements.
This module allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It lookup the proxy IP address using IP2Proxy API.
Getting Started
To begin, an API key is required for this module to function. Find further information at https://www.ip2location.com/ip2proxy-web-service
Installation
Add the following to your composer.json file:
{
"require": {
"ip2location/ip2proxy-php-api": "1.*"
}
}
Usage
<?php require 'class.IP2ProxyAPI.php'; // Second parameter supports PX1 to PX10 $api = new IP2ProxyAPI('YOUR_API_KEY', 'PX8'); if ($api->query('1.2.3.4')) { echo '<strong>Country Code</strong>: ' . $api->countryCode . '<br>'; echo '<strong>Country Name</strong>: ' . $api->countryName . '<br>'; echo '<strong>Region</strong>: ' . $api->regionName . '<br>'; echo '<strong>City</strong>: ' . $api->cityName . '<br>'; echo '<strong>ISP</strong>: ' . $api->isp . '<br>'; echo '<strong>Domain</strong>: ' . $api->domain . '<br>'; echo '<strong>Usage Type</strong>: ' . $api->usageType . '<br>'; echo '<strong>ASN</strong>: ' . $api->asn . '<br>'; echo '<strong>AS</strong>: ' . $api->as . '<br>'; echo '<strong>Last Seen</strong>: ' . $api->lastSeen . '<br>'; echo '<strong>Proxy Type</strong>: ' . $api->proxyType . '<br>'; echo '<strong>Is Proxy</strong>: ' . $api->isProxy . '<br>'; echo '<strong>Threat</strong>: ' . $api->threat . '<br>'; }
Response message
| Name | Description |
|---|---|
| response | OK if success, otherwise failed. |
| countryCode | 2 digits country code. |
| countryName | Country name. |
| regionName | Region or state name. |
| cityName | City name. |
| isp | The service provider name. |
| isProxy | YES if the IP is a Proxy. NO if the IP is not a proxy. DCH if the IP belongs to Hosting Provider, Data Center or Content Delivery Network. Note: DCH is only available for PX2, PX3 and PX4 query |
| proxyType | The type of proxy service. |
| domain | Internet domain name associated with IP address range. |
| usageType | Usage type classification of ISP or company. Refer Usage Type section. |
| asn | Autonomous system number (ASN). |
| as | Autonomous system (AS) name. |
| lastSeen | Proxy last seen in days. |
| threat | Security threat reported. |
Usage Type
- (COM) Commercial
- (ORG) Organization
- (GOV) Government
- (MIL) Military
- (EDU) University/College/School
- (LIB) Library
- (CDN) Content Delivery Network
- (ISP) Fixed Line ISP
- (MOB) Mobile ISP
- (DCH) Data Center/Web Hosting/Transit
- (SES) Search Engine Spider
- (RSV) Reserved
ip2location/ip2proxy-php-api 适用场景与选型建议
ip2location/ip2proxy-php-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 216 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「geolocation」 「web proxy」 「detect vpn」 「ip to vpn」 「ip2proxy」 「tor exits」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ip2location/ip2proxy-php-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ip2location/ip2proxy-php-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ip2location/ip2proxy-php-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Lazy loading for middleware and request handlers
Maps in minutes. Powered by the Google Maps API.
Model of a web-based resource
The official PHP library for apiip.net that allowing customers to automate IP address validation and geolocation lookup in websites, applications and back-office system. Visit our API docs at https://apiip.net/documentation
Retrieve a WebResourceInterface instance over HTTP
Supports GeoIP services (sypexgeo.net).
统计信息
- 总下载量: 216
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-15