koroban / WhoisParser

Lookup domain names, IP addresses and AS numbers by WHOIS
http://www.novutec.com
137 stars 125 forks source link

PHP5.5.6 is not parsing registrar data #16

Open tshaw opened 10 years ago

tshaw commented 10 years ago

Using PHP5.5.6Mavericks Server/WhoisParser it parses gtld info but doesn't parse the registrar data. See below for godaddy test:

testwhois.php:

<?php error_reporting(E_ALL); ini_set ('memory_limit', '80M');

require_once ('DomainParser/Parser.php'); require_once ('WhoisParser/Parser.php');

$parser = new Novutec\WhoisParser\Parser(); $result = $parser->lookup("CRAKPASS.COM"); echo $result->created; print_r($result);

?>

$ php testwhois.php 2010-02-12 00:00:00Novutec\WhoisParser\Result Object ( [name:protected] => crakpass.com [idnName:protected] => crakpass.com [status:protected] => Array ( [0] => clientDeleteProhibited [1] => clientRenewProhibited [2] => clientTransferProhibited [3] => clientUpdateProhibited )

[nameserver:protected] => Array
    (
        [0] => NS1.WEBDNSPROVIDER.COM
        [1] => NS2.WEBDNSPROVIDER.COM
        [2] => NS3.WEBDNSPROVIDER.COM
    )

[ips:protected] => 
[created:protected] => 2010-02-12 00:00:00
[changed:protected] => 2012-01-06 00:00:00
[expires:protected] => 2015-02-12 00:00:00
[registered:protected] => 1
[dnssec:protected] => 
[whoisserver:protected] => whois.godaddy.com
[contacts:protected] => stdClass Object
    (
    )

[registrar:protected] => Novutec\WhoisParser\Registrar Object
    (
        [id:protected] => 
        [name:protected] => GODADDY.COM, LLC
        [email:protected] => 
        [url:protected] => http://registrar.godaddy.com
    )

[rawdata:protected] => Array
    (
        [0] => Domain Name: CRAKPASS.COM
        [1] => Registry Domain ID: 1585206460_DOMAIN_COM-VRSN
        [2] => Registrar WHOIS Server: whois.godaddy.com
        [3] => Registrar URL: http://www.godaddy.com
        [4] => Update Date: 2012-01-06 11:37:07
        [5] => Creation Date: 2010-02-12 11:08:08
        [6] => Registrar Registration Expiration Date: 2015-02-12 11:08:08
        [7] => Registrar: GoDaddy.com, LLC
        [8] => Registrar IANA ID: 146
        [9] => Registrar Abuse Contact Email: abuse@godaddy.com
        [10] => Registrar Abuse Contact Phone: +1.480-624-2505
        [11] => Domain Status: clientTransferProhibited
        [12] => Domain Status: clientUpdateProhibited
        [13] => Domain Status: clientRenewProhibited
        [14] => Domain Status: clientDeleteProhibited
        [15] => Registry Registrant ID: 
        [16] => Registrant Name: Registration Private
        [17] => Registrant Organization: Domains By Proxy, LLC
        [18] => Registrant Street: DomainsByProxy.com
        [19] => Registrant Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [20] => Registrant City: Scottsdale
        [21] => Registrant State/Province: Arizona
        [22] => Registrant Postal Code: 85260
        [23] => Registrant Country: United States
        [24] => Registrant Phone: +1.4806242599
        [25] => Registrant Phone Ext: 
        [26] => Registrant Fax: +1.4806242598
        [27] => Registrant Fax Ext: 
        [28] => Registrant Email: CRAKPASS.COM@domainsbyproxy.com
        [29] => Registry Admin ID: 
        [30] => Admin Name: Registration Private
        [31] => Admin Organization: Domains By Proxy, LLC
        [32] => Admin Street: DomainsByProxy.com
        [33] => Admin Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [34] => Admin City: Scottsdale
        [35] => Admin State/Province: Arizona
        [36] => Admin Postal Code: 85260
        [37] => Admin Country: United States
        [38] => Admin Phone: +1.4806242599
        [39] => Admin Phone Ext: 
        [40] => Admin Fax: +1.4806242598
        [41] => Admin Fax Ext: 
        [42] => Admin Email: CRAKPASS.COM@domainsbyproxy.com
        [43] => Registry Tech ID: 
        [44] => Tech Name: Registration Private
        [45] => Tech Organization: Domains By Proxy, LLC
        [46] => Tech Street: DomainsByProxy.com
        [47] => Tech Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [48] => Tech City: Scottsdale
        [49] => Tech State/Province: Arizona
        [50] => Tech Postal Code: 85260
        [51] => Tech Country: United States
        [52] => Tech Phone: +1.4806242599
        [53] => Tech Phone Ext: 
        [54] => Tech Fax: +1.4806242598
        [55] => Tech Fax Ext: 
        [56] => Tech Email: CRAKPASS.COM@domainsbyproxy.com
        [57] => Name Server: NS1.WEBDNSPROVIDER.COM
        [58] => Name Server: NS2.WEBDNSPROVIDER.COM
        [59] => Name Server: NS3.WEBDNSPROVIDER.COM
        [60] => DNSSEC: unsigned
        [61] => URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/
        [62] => Last update of WHOIS database: 2014-01-02T21:00:00Z
        [63] => 
        [64] => The data contained in GoDaddy.com, LLC's WhoIs database,
        [65] => while believed by the company to be reliable, is provided "as is"
        [66] => with no guarantee or warranties regarding its accuracy.  This
        [67] => information is provided for the sole purpose of assisting you
        [68] => in obtaining information about domain name registration records.
        [69] => Any use of this data for any other purpose is expressly forbidden without the prior written
        [70] => permission of GoDaddy.com, LLC.  By submitting an inquiry,
        [71] => you agree to these terms of usage and limitations of warranty.  In particular,
        [72] => you agree not to use this data to allow, enable, or otherwise make possible,
        [73] => dissemination or collection of this data, in part or in its entirety, for any
        [74] => purpose, such as the transmission of unsolicited advertising and
        [75] => and solicitations of any kind, including spam.  You further agree
        [76] => not to use this data to enable high volume, automated or robotic electronic
        [77] => processes designed to collect or compile this data for any purpose,
        [78] => including mining this data for your own personal or commercial purposes. 
        [79] => 
        [80] => Please note: the registrant of the domain name is specified
        [81] => in the "registrant" section.  In most cases, GoDaddy.com, LLC 
        [82] => is not the registrant of domain names listed in this database.
        [83] => 
    )

[network:protected] => 
[exception:protected] => 
[parsedContacts:protected] => 
[template:protected] => gtld_godaddy

)

ghost commented 9 years ago

crakpass.com parses the contact details correctly for me.

{  
   "name":"crakpass.com",
   "idnName":"crakpass.com",
   "status":[  
      "clientTransferProhibited http:\/\/www.icann.org\/epp#clientTransferProhibited",
      "clientUpdateProhibited http:\/\/www.icann.org\/epp#clientUpdateProhibited",
      "clientRenewProhibited http:\/\/www.icann.org\/epp#clientRenewProhibited",
      "clientDeleteProhibited http:\/\/www.icann.org\/epp#clientDeleteProhibited"
   ],
   "nameserver":[  
      "NS1.WEBDNSPROVIDER.COM",
      "NS2.WEBDNSPROVIDER.COM",
      "NS3.WEBDNSPROVIDER.COM"
   ],
   "ips":null,
   "created":"12.02.2010 08:08:08",
   "changed":"15.01.2015 00:00:00",
   "expires":"12.02.2016 00:00:00",
   "registered":true,
   "dnssec":"unsigned",
   "whoisserver":"whois.godaddy.com",
   "contacts":{  
      "owner":[  
         {  
            "handle":null,
            "type":null,
            "name":"Registration Private",
            "organization":"Domains By Proxy, LLC",
            "email":"CRAKPASS.COM@domainsbyproxy.com",
            "address":[  
               "DomainsByProxy.com",
               "14747 N Northsight Blvd Suite 111, PMB 309"
            ],
            "zipcode":"85260",
            "city":"Scottsdale",
            "state":"Arizona",
            "country":"United States",
            "phone":"+1.4806242599",
            "fax":"+1.4806242598",
            "created":null,
            "changed":null
         }
      ],
      "admin":[  
         {  
            "handle":null,
            "type":null,
            "name":"Registration Private",
            "organization":"Domains By Proxy, LLC",
            "email":"CRAKPASS.COM@domainsbyproxy.com",
            "address":[  
               "DomainsByProxy.com",
               "14747 N Northsight Blvd Suite 111, PMB 309"
            ],
            "zipcode":"85260",
            "city":"Scottsdale",
            "state":"Arizona",
            "country":"United States",
            "phone":"+1.4806242599",
            "fax":"+1.4806242598",
            "created":null,
            "changed":null
         }
      ],
      "tech":[  
         {  
            "handle":null,
            "type":null,
            "name":"Registration Private",
            "organization":"Domains By Proxy, LLC",
            "email":"CRAKPASS.COM@domainsbyproxy.com",
            "address":[  
               "DomainsByProxy.com",
               "14747 N Northsight Blvd Suite 111, PMB 309"
            ],
            "zipcode":"85260",
            "city":"Scottsdale",
            "state":"Arizona",
            "country":"United States",
            "phone":"+1.4806242599",
            "fax":"+1.4806242598",
            "created":null,
            "changed":null
         }
      ]
   },
   "registrar":{  
      "id":"146",
      "name":"GoDaddy.com, LLC",
      "email":"abuse@godaddy.com",
      "url":"http:\/\/www.godaddy.com",
      "phone":"+1.4806242505"
   },
   "rawdata":[  
      "\nWhois Server Version 2.0\n\nDomain names in the .com and .net domains can now be registered\nwith many different competing registrars. Go to http:\/\/www.internic.net\nfor detailed information.\n\n Domain Name: CRAKPASS.COM\n Registrar: GODADDY.COM, LLC\n Sponsoring Registrar IANA ID: 146\n Whois Server: whois.godaddy.com\n Referral URL: http:\/\/registrar.godaddy.com\n Name Server: NS1.WEBDNSPROVIDER.COM\n Name Server: NS2.WEBDNSPROVIDER.COM\n Name Server: NS3.WEBDNSPROVIDER.COM\n Status: clientDeleteProhibited http:\/\/www.icann.org\/epp#clientDeleteProhibited\n Status: clientRenewProhibited http:\/\/www.icann.org\/epp#clientRenewProhibited\n Status: clientTransferProhibited http:\/\/www.icann.org\/epp#clientTransferProhibited\n Status: clientUpdateProhibited http:\/\/www.icann.org\/epp#clientUpdateProhibited\n Updated Date: 15-jan-2015\n Creation Date: 12-feb-2010\n Expiration Date: 12-feb-2016\n\n>>> Last update of whois database: Wed, 15 Jul 2015 09:07:54 GMT <<<\n\nNOTICE: The expiration date displayed in this record is the date the \nregistrar's sponsorship of the domain name registration in the registry is \ncurrently set to expire. This date does not necessarily reflect the expiration \ndate of the domain name registrant's agreement with the sponsoring \nregistrar. Users may consult the sponsoring registrar's Whois database to \nview the registrar's reported date of expiration for this registration.\n\nTERMS OF USE: You are not authorized to access or query our Whois \ndatabase through the use of electronic processes that are high-volume and \nautomated except as reasonably necessary to register domain names or \nmodify existing registrations; the Data in VeriSign Global Registry \nServices' (\"VeriSign\") Whois database is provided by VeriSign for \ninformation purposes only, and to assist persons in obtaining information \nabout or related to a domain name registration record. VeriSign does not \nguarantee its accuracy. By submitting a Whois query, you agree to abide \nby the following terms of use: You agree that you may use this Data only \nfor lawful purposes and that under no circumstances will you use this Data \nto: (1) allow, enable, or otherwise support the transmission of mass \nunsolicited, commercial advertising or solicitations via e-mail, telephone, \nor facsimile; or (2) enable high volume, automated, electronic processes \nthat apply to VeriSign (or its computer systems). The compilation, \nrepackaging, dissemination or other use of this Data is expressly \nprohibited without the prior written consent of VeriSign. You agree not to \nuse electronic processes that are automated and high-volume to access or \nquery the Whois database except as reasonably necessary to register \ndomain names or modify existing registrations. VeriSign reserves the right \nto restrict your access to the Whois database in its sole discretion to ensure \noperational stability. VeriSign may restrict or terminate your access to the \nWhois database for failure to abide by these terms of use. VeriSign \nreserves the right to modify these terms at any time. \n\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\nRegistrars.\n\nFor more information on Whois status codes, please visit \nhttps:\/\/www.icann.org\/resources\/pages\/epp-status-codes-2014-06-16-en.\n",
      "Domain Name: CRAKPASS.COM\nRegistry Domain ID: 1585206460_DOMAIN_COM-VRSN\nRegistrar WHOIS Server: whois.godaddy.com\nRegistrar URL: http:\/\/www.godaddy.com\nUpdate Date: 2015-01-15T17:04:39Z\nCreation Date: 2010-02-12T16:08:08Z\nRegistrar Registration Expiration Date: 2016-02-12T16:08:08Z\nRegistrar: GoDaddy.com, LLC\nRegistrar IANA ID: 146\nRegistrar Abuse Contact Email: abuse@godaddy.com\nRegistrar Abuse Contact Phone: +1.4806242505\nDomain Status: clientTransferProhibited http:\/\/www.icann.org\/epp#clientTransferProhibited\nDomain Status: clientUpdateProhibited http:\/\/www.icann.org\/epp#clientUpdateProhibited\nDomain Status: clientRenewProhibited http:\/\/www.icann.org\/epp#clientRenewProhibited\nDomain Status: clientDeleteProhibited http:\/\/www.icann.org\/epp#clientDeleteProhibited\nRegistry Registrant ID: \nRegistrant Name: Registration Private\nRegistrant Organization: Domains By Proxy, LLC\nRegistrant Street: DomainsByProxy.com\nRegistrant Street: 14747 N Northsight Blvd Suite 111, PMB 309\nRegistrant City: Scottsdale\nRegistrant State\/Province: Arizona\nRegistrant Postal Code: 85260\nRegistrant Country: United States\nRegistrant Phone: +1.4806242599\nRegistrant Phone Ext: \nRegistrant Fax: +1.4806242598\nRegistrant Fax Ext: \nRegistrant Email: CRAKPASS.COM@domainsbyproxy.com\nRegistry Admin ID: \nAdmin Name: Registration Private\nAdmin Organization: Domains By Proxy, LLC\nAdmin Street: DomainsByProxy.com\nAdmin Street: 14747 N Northsight Blvd Suite 111, PMB 309\nAdmin City: Scottsdale\nAdmin State\/Province: Arizona\nAdmin Postal Code: 85260\nAdmin Country: United States\nAdmin Phone: +1.4806242599\nAdmin Phone Ext: \nAdmin Fax: +1.4806242598\nAdmin Fax Ext: \nAdmin Email: CRAKPASS.COM@domainsbyproxy.com\nRegistry Tech ID: \nTech Name: Registration Private\nTech Organization: Domains By Proxy, LLC\nTech Street: DomainsByProxy.com\nTech Street: 14747 N Northsight Blvd Suite 111, PMB 309\nTech City: Scottsdale\nTech State\/Province: Arizona\nTech Postal Code: 85260\nTech Country: United States\nTech Phone: +1.4806242599\nTech Phone Ext: \nTech Fax: +1.4806242598\nTech Fax Ext: \nTech Email: CRAKPASS.COM@domainsbyproxy.com\nName Server: NS1.WEBDNSPROVIDER.COM\nName Server: NS2.WEBDNSPROVIDER.COM\nName Server: NS3.WEBDNSPROVIDER.COM\nDNSSEC: unsigned\nURL of the ICANN WHOIS Data Problem Reporting System: http:\/\/wdprs.internic.net\/\n>>> Last update of WHOIS database: 2015-07-15T09:00:00Z <<<\n\nFor more information on Whois status codes, please visit https:\/\/www.icann.org\/resources\/pages\/epp-status-codes-2014-06-16-en\n\nThe data contained in GoDaddy.com, LLC's WhoIs database,\nwhile believed by the company to be reliable, is provided \"as is\"\nwith no guarantee or warranties regarding its accuracy. This\ninformation is provided for the sole purpose of assisting you\nin obtaining information about domain name registration records.\nAny use of this data for any other purpose is expressly forbidden without the prior written\npermission of GoDaddy.com, LLC. By submitting an inquiry,\nyou agree to these terms of usage and limitations of warranty. In particular,\nyou agree not to use this data to allow, enable, or otherwise make possible,\ndissemination or collection of this data, in part or in its entirety, for any\npurpose, such as the transmission of unsolicited advertising and\nand solicitations of any kind, including spam. You further agree\nnot to use this data to enable high volume, automated or robotic electronic\nprocesses designed to collect or compile this data for any purpose,\nincluding mining this data for your own personal or commercial purposes. \n\nPlease note: the registrant of the domain name is specified\nin the \"registrant\" section. In most cases, GoDaddy.com, LLC \nis not the registrant of domain names listed in this database.\n"
   ],
   "network":null,
   "exception":null,
   "parsedContacts":true,
   "template":{  
      "whois.verisign-grs.com":"verisign",
      "whois.godaddy.com":"standard"
   },
   "ask_whois":"whois.godaddy.com"
}