Problem parsing .im domains
PHP-Whois version: x.y.z
PHP version: 7.3/7.4
Description
-
If you query the domain
twitter.imthe expiration date value will be0even though the expiration date from the whois record isExpiry Date: 19/02/2021 00:59:50 -
If you query
google.imthe expiration date value will be2020-09-08even though the expiration date from the whois record isExpiry Date: 09/08/2020 23:59:46
in google domain the date/month has been swapped, and adding the inversedDateMMDD didn't help
How to reproduce
$info = $whois->loadDomainInfo('twitter.im');
if (!$info) {
throw new WhoisException('Domain is not registered.');
}
return [ 'domainName' => $info->getDomainName(),
'domainNameUnicode' => $info->getDomainNameUnicode(),
'owner' => $info->getOwner() ?: 'N/A',
'registrar' => $info->getRegistrar() ?: 'N/A',
'creationDate' => date('Y-m-d', $info->getCreationDate() ?: time()),
'registryExpiryDate' => date('Y-m-d', $info->getExpirationDate() ?: time()),
'registryExpiryDateUnix' => $info->getExpirationDate(),
'nameServers' => $info->getNameServers(),
]
Additional context
I have also seen the same behaviour in two domains other than twitter.im
I guess it's due to country date format in same sequence - https://en.wikipedia.org/wiki/Date_format_by_country
Ok, I'll try to fix that
Thanks
On Tue, 7 Apr 2020, 7:33 pm Sergey Sedyshev, [email protected] wrote:
I guess it's due to country date format in same sequence - https://en.wikipedia.org/wiki/Date_format_by_country
Ok, I'll try to fix that
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/io-developer/php-whois/issues/110#issuecomment-610490999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGX2EJCMSCFBH62WPBTDLRLNIVBANCNFSM4MDF3FUQ .
I have upgraded to v4.0 but the issue stay the same, the thing that I've noticed is that when you dump the info about a domain you can see that the expiration date is correct
object(Iodev\Whois\Modules\Tld\TldInfo)#980 (5) {
["dataDefault":protected]=>
array(9) {
["parserType"]=>
string(0) ""
["domainName"]=>
string(0) ""
["whoisServer"]=>
string(0) ""
["nameServers"]=>
array(0) {
}
["creationDate"]=>
int(0)
["expirationDate"]=>
int(0)
["states"]=>
array(0) {
}
["owner"]=>
string(0) ""
["registrar"]=>
string(0) ""
}
["response":protected]=>
object(Iodev\Whois\Modules\Tld\TldResponse)#972 (3) {
["dataDefault":protected]=>
array(4) {
["query"]=>
string(0) ""
["text"]=>
string(0) ""
["host"]=>
string(0) ""
["domain"]=>
string(0) ""
}
["data":protected]=>
array(4) {
["domain"]=>
string(10) "twitter.im"
["host"]=>
string(12) "whois.nic.im"
["query"]=>
string(12) "twitter.im
"
["text"]=>
string(617) "
This information has been redacted to comply with European Union General Data Protection Regulations (GDPR). Please
contact us at [email protected] if you have any further queries.
Domain Name: twitter.im
Domain Managers
Name: Redacted
Address
Redacted
Domain Owners / Registrant
Name: Redacted
Address
Redacted
Administrative Contact
Name: Redacted
Address
Redacted
Billing Contact
Name: Redacted
Address
Redacted
Technical Contact
Name: Redacted
Address
Redacted
Domain Details
Expiry Date: 19/02/2021 00:59:50
Name Server:ns1.park.do.
Name Server:ns2.park.do.
"
}
["dataAlias":protected]=>
array(0) {
}
}
["extra":protected]=>
array(5) {
["groups"]=>
array(2) {
[0]=>
array(1) {
[0]=>
string(174) "This information has been redacted to comply with European Union General Data Protection Regulations
(GDPR). Please contact us at [email protected] if you have any further queries."
}
[1]=>
array(20) {
["Domain Name"]=>
string(10) "twitter.im"
[0]=>
string(15) "Domain Managers"
["Name"]=>
array(5) {
[0]=>
string(8) "Redacted"
[1]=>
string(8) "Redacted"
[2]=>
string(8) "Redacted"
[3]=>
string(8) "Redacted"
[4]=>
string(8) "Redacted"
}
[1]=>
string(7) "Address"
[2]=>
string(8) "Redacted"
[3]=>
string(26) "Domain Owners / Registrant"
[4]=>
string(7) "Address"
[5]=>
string(8) "Redacted"
[6]=>
string(22) "Administrative Contact"
[7]=>
string(7) "Address"
[8]=>
string(8) "Redacted"
[9]=>
string(15) "Billing Contact"
[10]=>
string(7) "Address"
[11]=>
string(8) "Redacted"
[12]=>
string(17) "Technical Contact"
[13]=>
string(7) "Address"
[14]=>
string(8) "Redacted"
[15]=>
string(14) "Domain Details"
["Expiry Date"]=>
string(19) "19/02/2021 00:59:50"
["Name Server"]=>
array(2) {
[0]=>
string(12) "ns1.park.do."
[1]=>
string(12) "ns2.park.do."
}
}
}
["rootFilter"]=>
object(Iodev\Whois\Helpers\GroupFilter)#979 (6) {
["groups":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(2) {
[0]=>
array(1) {
[0]=>
string(174) "This information has been redacted to comply with European Union General Data Protection Regulations
(GDPR). Please contact us at [email protected] if you have any further queries."
}
[1]=>
array(20) {
["Domain Name"]=>
string(10) "twitter.im"
[0]=>
string(15) "Domain Managers"
["Name"]=>
array(5) {
[0]=>
string(8) "Redacted"
[1]=>
string(8) "Redacted"
[2]=>
string(8) "Redacted"
[3]=>
string(8) "Redacted"
[4]=>
string(8) "Redacted"
}
[1]=>
string(7) "Address"
[2]=>
string(8) "Redacted"
[3]=>
string(26) "Domain Owners / Registrant"
[4]=>
string(7) "Address"
[5]=>
string(8) "Redacted"
[6]=>
string(22) "Administrative Contact"
[7]=>
string(7) "Address"
[8]=>
string(8) "Redacted"
[9]=>
string(15) "Billing Contact"
[10]=>
string(7) "Address"
[11]=>
string(8) "Redacted"
[12]=>
string(17) "Technical Contact"
[13]=>
string(7) "Address"
[14]=>
string(8) "Redacted"
[15]=>
string(14) "Domain Details"
["Expiry Date"]=>
string(19) "19/02/2021 00:59:50"
["Name Server"]=>
array(2) {
[0]=>
string(12) "ns1.park.do."
[1]=>
string(12) "ns2.park.do."
}
}
}
["headerKey":"Iodev\Whois\Helpers\GroupFilter":private]=>
string(10) "__HEADER__"
["domainKeys":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(7) {
[0]=>
string(6) "domain"
[1]=>
string(10) "domainname"
[2]=>
string(11) "domain_name"
[3]=>
string(11) "domain name"
[4]=>
string(20) "complete domain name"
[5]=>
string(7) "Dominio"
[6]=>
string(5) "query"
}
["subsetParams":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(1) {
["$domain"]=>
string(10) "twitter.im"
}
["matchFirstOnly":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(false)
["ignoreCase":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(true)
}
["domainFilter"]=>
object(Iodev\Whois\Helpers\GroupFilter)#977 (6) {
["groups":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(1) {
[0]=>
array(20) {
["Domain Name"]=>
string(10) "twitter.im"
[0]=>
string(15) "Domain Managers"
["Name"]=>
array(5) {
[0]=>
string(8) "Redacted"
[1]=>
string(8) "Redacted"
[2]=>
string(8) "Redacted"
[3]=>
string(8) "Redacted"
[4]=>
string(8) "Redacted"
}
[1]=>
string(7) "Address"
[2]=>
string(8) "Redacted"
[3]=>
string(26) "Domain Owners / Registrant"
[4]=>
string(7) "Address"
[5]=>
string(8) "Redacted"
[6]=>
string(22) "Administrative Contact"
[7]=>
string(7) "Address"
[8]=>
string(8) "Redacted"
[9]=>
string(15) "Billing Contact"
[10]=>
string(7) "Address"
[11]=>
string(8) "Redacted"
[12]=>
string(17) "Technical Contact"
[13]=>
string(7) "Address"
[14]=>
string(8) "Redacted"
[15]=>
string(14) "Domain Details"
["Expiry Date"]=>
string(19) "19/02/2021 00:59:50"
["Name Server"]=>
array(2) {
[0]=>
string(12) "ns1.park.do."
[1]=>
string(12) "ns2.park.do."
}
}
}
["headerKey":"Iodev\Whois\Helpers\GroupFilter":private]=>
string(10) "__HEADER__"
["domainKeys":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(7) {
[0]=>
string(6) "domain"
[1]=>
string(10) "domainname"
[2]=>
string(11) "domain_name"
[3]=>
string(11) "domain name"
[4]=>
string(20) "complete domain name"
[5]=>
string(7) "Dominio"
[6]=>
string(5) "query"
}
["subsetParams":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(1) {
["$domain"]=>
string(10) "twitter.im"
}
["matchFirstOnly":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(true)
["ignoreCase":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(true)
}
["primaryFilter"]=>
object(Iodev\Whois\Helpers\GroupFilter)#976 (6) {
["groups":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(1) {
[0]=>
array(20) {
["Domain Name"]=>
string(10) "twitter.im"
[0]=>
string(15) "Domain Managers"
["Name"]=>
array(5) {
[0]=>
string(8) "Redacted"
[1]=>
string(8) "Redacted"
[2]=>
string(8) "Redacted"
[3]=>
string(8) "Redacted"
[4]=>
string(8) "Redacted"
}
[1]=>
string(7) "Address"
[2]=>
string(8) "Redacted"
[3]=>
string(26) "Domain Owners / Registrant"
[4]=>
string(7) "Address"
[5]=>
string(8) "Redacted"
[6]=>
string(22) "Administrative Contact"
[7]=>
string(7) "Address"
[8]=>
string(8) "Redacted"
[9]=>
string(15) "Billing Contact"
[10]=>
string(7) "Address"
[11]=>
string(8) "Redacted"
[12]=>
string(17) "Technical Contact"
[13]=>
string(7) "Address"
[14]=>
string(8) "Redacted"
[15]=>
string(14) "Domain Details"
["Expiry Date"]=>
string(19) "19/02/2021 00:59:50"
["Name Server"]=>
array(2) {
[0]=>
string(12) "ns1.park.do."
[1]=>
string(12) "ns2.park.do."
}
}
}
["headerKey":"Iodev\Whois\Helpers\GroupFilter":private]=>
string(10) "__HEADER__"
["domainKeys":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(7) {
[0]=>
string(6) "domain"
[1]=>
string(10) "domainname"
[2]=>
string(11) "domain_name"
[3]=>
string(11) "domain name"
[4]=>
string(20) "complete domain name"
[5]=>
string(7) "Dominio"
[6]=>
string(5) "query"
}
["subsetParams":"Iodev\Whois\Helpers\GroupFilter":private]=>
array(1) {
["$domain"]=>
string(10) "twitter.im"
}
["matchFirstOnly":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(true)
["ignoreCase":"Iodev\Whois\Helpers\GroupFilter":private]=>
bool(true)
}
["reserved"]=>
NULL
}
["data":protected]=>
array(9) {
["parserType"]=>
string(13) "indentAutofix"
["domainName"]=>
string(10) "twitter.im"
["states"]=>
array(0) {
}
["nameServers"]=>
array(2) {
[0]=>
string(11) "ns1.park.do"
[1]=>
string(11) "ns2.park.do"
}
["owner"]=>
string(8) "Redacted"
["registrar"]=>
NULL
["creationDate"]=>
int(0)
["expirationDate"]=>
int(0)
["whoisServer"]=>
string(0) ""
}
["dataAlias":protected]=>
array(0) {
}
}
which is ["Expiry Date"]=>string(19) "19/02/2021 00:59:50" but when you try to get the expiration date $info->expirationDate it returns 0