Update WhoisService.php
This commit is contained in:
@@ -55,7 +55,18 @@ class WhoisService
|
|||||||
$rdapData = $this->queryRDAPGeneric($domain, $rdapUrl);
|
$rdapData = $this->queryRDAPGeneric($domain, $rdapUrl);
|
||||||
if ($rdapData) {
|
if ($rdapData) {
|
||||||
// If RDAP succeeded but is missing expiration date, try WHOIS as fallback
|
// If RDAP succeeded but is missing expiration date, try WHOIS as fallback
|
||||||
if (empty($rdapData['expiration_date']) && $whoisServer) {
|
// But only if the domain is not already marked as available
|
||||||
|
$isAvailable = false;
|
||||||
|
if (isset($rdapData['status']) && is_array($rdapData['status'])) {
|
||||||
|
foreach ($rdapData['status'] as $status) {
|
||||||
|
if (stripos($status, 'AVAILABLE') !== false) {
|
||||||
|
$isAvailable = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($rdapData['expiration_date']) && !$isAvailable && $whoisServer) {
|
||||||
$whoisData = $this->queryWhois($domain, $whoisServer);
|
$whoisData = $this->queryWhois($domain, $whoisServer);
|
||||||
if ($whoisData) {
|
if ($whoisData) {
|
||||||
// Check if we got a referral to another WHOIS server
|
// Check if we got a referral to another WHOIS server
|
||||||
|
|||||||
Reference in New Issue
Block a user