PHPackages                             arrayaccess/rdap-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. arrayaccess/rdap-client

ActiveLibrary[API Development](/categories/api)

arrayaccess/rdap-client
=======================

Registration Data Access Protocol (RDAP) Client For PHP

1.0.1(1y ago)422.5k↓10.1%4[2 issues](https://github.com/ArrayAccess/RDAP-Client/issues)GPL-3.0-or-laterPHPPHP &gt;= 8.1CI passing

Since Jan 3Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ArrayAccess/RDAP-Client)[ Packagist](https://packagist.org/packages/arrayaccess/rdap-client)[ GitHub Sponsors](https://github.com/sponsors/arrayiterator)[ RSS](/packages/arrayaccess-rdap-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

RDAP CLIENT
===========

[](#rdap-client)

RDAP Client For PHP (Formerly Whois via http protocol)

Requirements
------------

[](#requirements)

- php `8.1` or later
- `ext-json`
- `ext-intl`

### IETF RDAP Reference

[](#ietf-rdap-reference)

- Registration Data Access Protocol (RDAP) Object Tagging **[\#RFC8521](https://datatracker.ietf.org/doc/html/rfc8521)**
- Security Services for the Registration Data Access Protocol (RDAP) **[\#RFC7481](https://datatracker.ietf.org/doc/html/rfc7481)**
- Registration Data Access Protocol (RDAP) Query Format **[\#RFC9082](https://datatracker.ietf.org/doc/html/rfc9082)**
- JSON Responses for the Registration Data Access Protocol (RDAP) **[\#RFC9083](https://datatracker.ietf.org/doc/html/rfc9083)**
- Finding the Authoritative Registration Data (RDAP) Service **[\#RFC9224](https://datatracker.ietf.org/doc/html/rfc9224)**

Schema Inventory &amp; Analysis of WHOIS object

- Inventory and Analysis of WHOIS Registration Objects **[\#RFC7485](https://datatracker.ietf.org/doc/html/rfc7485)**

### IANA RDAP Data

[](#iana-rdap-data)

Iana provide data about rdap

- HTTP :
- Bootstrap Service Registry for AS Number Space **[\#RFC9224](https://datatracker.ietf.org/doc/html/rfc9224)**
- Bootstrap Service Registry for Domain Name Space **[\#RFC9224](https://datatracker.ietf.org/doc/html/rfc9224)**
- Bootstrap Service Registry for IPv4 Address Space **[\#RFC9224](https://datatracker.ietf.org/doc/html/rfc9224)**
- Bootstrap Service Registry for IPv6 Address Space **[\#RFC9224](https://datatracker.ietf.org/doc/html/rfc9224)**
- Bootstrap Service Registry for Provider Object Tags **[\#RFC8521](https://datatracker.ietf.org/doc/html/rfc8521)**
- Recovered IPv4 Pool **[\#RFC8521](https://datatracker.ietf.org/doc/html/rfc8521)**

For list of predefined recovered IPv4 addresses: **[RecoveredIPv4.php](src/Services/RecoveredIPv4.php)**

### Example Usage

[](#example-usage)

See [Client.php](src/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 $request
 */
$domainName = 'example.com';
$request = $client->request($domainName);

/**
 * @var RdapRequestInterface $request
 */
$ipv4 = '192.0.47.59'; // iana.org ipv4
$request = $client->request($ipv4);

/**
 * @var RdapRequestInterface $request
 */
$ipv6 = '2404:6800:4003:c01::66'; // google.com
$request = $client->request($ipv6);

/**
 * @var RdapRequestInterface $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 $request
 * Autonomous System Number parsed by "^(?ASN?)?(?[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](src/Response/Definitions) for more details about code

Note
----

[](#note)

The code of data definition contains strict types. Some of the invalid data will throw an error.

WHOIS Data Collection
---------------------

[](#whois-data-collection)

Refer to: *(gist)* [WHOIS List](https://gist.github.com/ArrayIterator/1a8df2b5c59f50990661f11c050c7c2a) to get the list of whois servers / ip range / sTLD etc.

**Caution!** the gist contains huge data.

LICENSE
-------

[](#license)

[GPL-3.0-or-later](LICENSE)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance57

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb0f33448498e932b0d1b70d2290614c2b62bbcbd545fe236f5866a4b636ca26?d=identicon)[ArrayIterator](/maintainers/ArrayIterator)

---

Top Contributors

[![ArrayIterator](https://avatars.githubusercontent.com/u/37867551?v=4)](https://github.com/ArrayIterator "ArrayIterator (37 commits)")[![klkvsk](https://avatars.githubusercontent.com/u/1466771?v=4)](https://github.com/klkvsk "klkvsk (1 commits)")

---

Tags

php-rdaprdaprdap-clientrdap-protocolwhoisIPwhoisasnrdaprdap-clientrdap-phpnameserverphp-rdap

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arrayaccess-rdap-client/health.svg)

```
[![Health](https://phpackages.com/badges/arrayaccess-rdap-client/health.svg)](https://phpackages.com/packages/arrayaccess-rdap-client)
```

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M294](/packages/geoip2-geoip2)[io-developer/php-whois

PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible

4922.4M8](/packages/io-developer-php-whois)[ok/ipstack-client

A PHP wrapper for using Ipstack API

10384.3k](/packages/ok-ipstack-client)[whois-server-list/whois-api

Client library for the Whois API. You can check the availability of internet domain names or perform whois queries.

331.7k](/packages/whois-server-list-whois-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
