frdl/oid-connect-rdap
Composer 安装命令:
composer require frdl/oid-connect-rdap
包简介
OID-Connect RDAP Client (Whois via RDAP)
README 文档
README
RDAP look ups extended by OID-Connect protocols.
OID-Connect RDAP Client (Whois via RDAP)
Forked from ArrayAccess/RDAPClient
RDAP CLIENT
RDAP Client For PHP (Formerly Whois via http protocol)
Requirements
- php
8.1or later ext-jsonext-intl
IETF RDAP Reference
- Registration Data Access Protocol (RDAP) Object Tagging #RFC8521
- Security Services for the Registration Data Access Protocol (RDAP) #RFC7481
- Registration Data Access Protocol (RDAP) Query Format #RFC9082
- JSON Responses for the Registration Data Access Protocol (RDAP) #RFC9083
- Finding the Authoritative Registration Data (RDAP) Service #RFC9224
Schema Inventory & Analysis of WHOIS object
- Inventory and Analysis of WHOIS Registration Objects #RFC7485
IANA RDAP Data
Iana provide data about rdap
-
HTTP : https://data.iana.org/rdap/
-
Bootstrap Service Registry for AS Number Space #RFC9224 https://www.iana.org/assignments/rdap-asn/rdap-asn.xhtml
-
Bootstrap Service Registry for Domain Name Space #RFC9224 https://www.iana.org/assignments/rdap-dns/rdap-dns.xhtml
-
Bootstrap Service Registry for IPv4 Address Space #RFC9224 https://www.iana.org/assignments/rdap-ipv4/rdap-ipv4.xhtml
-
Bootstrap Service Registry for IPv6 Address Space #RFC9224 https://www.iana.org/assignments/rdap-ipv6/rdap-ipv6.xhtml
-
Bootstrap Service Registry for Provider Object Tags #RFC8521 https://www.iana.org/assignments/rdap-object-tags/rdap-object-tags.xhtml
-
Recovered IPv4 Pool #RFC8521 https://www.iana.org/assignments/ipv4-recovered-address-space/ipv4-recovered-address-space.xhtml
For list of predefined recovered IPv4 addresses: RecoveredIPv4.php
Example Usage
See Client.php for more methods
use ArrayAccess\RdapClient\Client; use ArrayAccess\RdapClient\Interfaces\RdapRequestInterface; use ArrayAccess\RdapClient\Protocols\AsnProtocol; use ArrayAccess\RdapClient\Protocols\DomainProtocol; use ArrayAccess\RdapClient\Protocols\IPv4Protocol; use ArrayAccess\RdapClient\Protocols\IPv6Protocol; use ArrayAccess\RdapClient\Protocols\NsProtocol; $client = new Client(); /** * @var RdapRequestInterface<string, DomainProtocol> $request */ $domainName = 'example.com'; $request = $client->request($domainName); /** * @var RdapRequestInterface<string, IPv4Protocol> $request */ $ipv4 = '192.0.47.59'; // iana.org ipv4 $request = $client->request($ipv4); /** * @var RdapRequestInterface<string, IPv6Protocol> $request */ $ipv6 = '2404:6800:4003:c01::66'; // google.com $request = $client->request($ipv6); /** * @var RdapRequestInterface<string, NsProtocol> $request * Name server guessing by prefix (ns[0-9]*).domain-name.ext or [^\.]+.(ns[0-9]*.[^\.]+\.)(?:.+).domain-name.ext */ $nameserver = 'ns1.google.com'; // google name server $request = $client->request($nameserver); /** * @var RdapRequestInterface<string, AsnProtocol> $request * Autonomous System Number parsed by "^(?ASN?)?(?<as_number>[0-9]+)$" */ $asNumber = 'AS15169'; // Google LLC ASN // or just put the numeric string / integer $request = $client->request($asNumber);
// getting object response $response = $request->getResponse(); // getting json data $jsonResponse = $response->getResponseJson(); // getting definition object $definition = $response->getDefinition(); // if domain > getting related / another whois server request if possible $alternateRequest = $definition->getRelatedRequest(); // json serialize $fallbackToJson = json_encode($definition, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
// direct call with custom request target // makes sure the type of RDAP uri target is equal '/domain/GOOGLE.com' as domain-protocol $newRequest = $request->withRdapSearchURL('https://rdap.markmonitor.com/rdap/domain/GOOGLE.COM'); $response = $newRequest->getResponse();
See Response/Definitions for more details about code
Note
The code of data definition contains strict types. Some of the invalid data will throw an error.
WHOIS Data Collection
Refer to: (gist) WHOIS List to get the list of whois servers / ip range / sTLD etc.
Caution! the gist contains huge data.
LICENSE
frdl/oid-connect-rdap 适用场景与选型建议
frdl/oid-connect-rdap 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 03 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「whois」 「IP」 「oid」 「asn」 「rdap」 「rdap-client」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 frdl/oid-connect-rdap 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 frdl/oid-connect-rdap 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 frdl/oid-connect-rdap 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The SNMP pass_persist threaded backend
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible
Official PHP SDK for the IPGeolocation.io IP Location API with single and bulk lookup support.
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. Based on io-developer/php-whois v4.1.10.
PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 7.2+ compatible
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2024-03-10