Search code examples
phpwhoisregistrar

What are regrinfo and regyinfo in whois lookup php response data? How do they differ from raw_data in php response data?


I am trying to retrieve the information of domain using phpWhois to know the Registration status, Registrar, Creation and Expiry Dates of the domain.

To retrieve the information of domain,

use phpWhois\Whois;
----
----
$domainDetails = $this->whois->lookup($domain, true);

For example: towerhealth.org

It results,

Array
(
    [regrinfo] => Array
        (
            [domain] => Array
                (
                    [name] => towerhealth.org
                    [handle] => D402200000002315693-LROR
                    [changed] => 2019-04-15
                    [created] => 2017-05-04
                    [expires] => 2024-05-04
                    [sponsor] => GoDaddy.com, LLC
                    [status] => Array
                        (
                            [0] => clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
                            [1] => clientRenewProhibited https://icann.org/epp#clientRenewProhibited
                            [2] => clientTransferProhibited https://icann.org/epp#clientTransferProhibited
                            [3] => clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
                        )

                    [nserver] => Array
                        (
                            [pdns11.domaincontrol.com] => 97.74.111.55
                            [pdns12.domaincontrol.com] => 173.201.79.55
                        )

                )

            [owner] => Array
                (
                    [organization] => Domains By Proxy, LLC
                    [address] => Array
                        (
                            [state] => Arizona
                            [country] => US
                        )

                )

            [registered] => yes
        )

    [regyinfo] => Array
        (
            [referrer] => http://www.pir.org/
            [registrar] => Public Interest Registry
            [servers] => Array
                (
                    [0] => Array
                        (
                            [server] => whois.pir.org
                            [args] => towerhealth.org
                            [port] => 43
                        )

                )

            [type] => domain
        )

    [rawdata] => Array
        (
            [0] => Domain Name: TOWERHEALTH.ORG
            [1] => Registry Domain ID: D402200000002315693-LROR
            [2] => Registrar WHOIS Server: whois.godaddy
            [3] => Registrar URL: http://www.whois.godaddy.com
            [4] => Updated Date: 2019-04-15T13:56:05Z
            [5] => Creation Date: 2017-05-04T21:12:23Z
            [6] => Registry Expiry Date: 2024-05-04T21:12:23Z
            [7] => Registrar Registration Expiration Date:
            [8] => Registrar: GoDaddy.com, LLC
            [9] => Registrar IANA ID: 146
            [10] => Registrar Abuse Contact Email: [email protected]
            [11] => Registrar Abuse Contact Phone: +1.4806242505
            [12] => Reseller:
            [13] => Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
            [14] => Domain Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited
            [15] => Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
            [16] => Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
            [17] => Registrant Organization: Domains By Proxy, LLC
            [18] => Registrant State/Province: Arizona
            [19] => Registrant Country: US
            [20] => Name Server: PDNS11.DOMAINCONTROL.COM
            [21] => Name Server: PDNS12.DOMAINCONTROL.COM
            [22] => DNSSEC: unsigned
            [23] => URL of the ICANN Whois Inaccuracy Complaint Form https://www.icann.org/wicf/)
            [24] => >>> Last update of WHOIS database: 2021-07-29T14:01:31Z <<<
            [25] => 
            [26] => For more information on Whois status codes, please visit https://icann.org/epp
            [27] => 
            [28] => Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.
            [29] => 
            [30] => The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
        )

)

[regyinfo] contains Public Interest Registry as [registrar] whereas [raw_data] has Registrar WHOIS Server as whois.godaddy. Can anyone explain me why does the registrar details in [regyinfo] differ from Registrar WHOIS Server information in [rawdata]?

In some cases, it results,

[regyinfo] => Array
        (
            [registrar] => Network Solutions, LLC
            [servers] => Array
                (
                    [0] => Array
                        (
                            [server] => net.whois-servers.net
                            [args] => domain =swhealth.net
                            [port] => 43
                        )

                )

            [type] => domain
        )

Thanks in Advance.


Solution

  • In phpWhois the [regyinfo] is hard-coded as you can see in the code: https://github.com/sparc/phpWhois.org/blob/master/src/whois.org.php on line 42 and 43.

    I think this is because the "Public Interest Registry" is the top-level registry for the .org gTLD, whereas godaddy (in this case) is the registrar handing out the domain to its user.

    I hope this answers your question. For reference have a look at the pir wikipedia entry and their site.