diff --git a/rdap/start_rdap.php b/rdap/start_rdap.php index 9b715ff..1ae0ecf 100644 --- a/rdap/start_rdap.php +++ b/rdap/start_rdap.php @@ -350,6 +350,16 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { $stmt2->execute(); $statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0); + // Add rgpstatus to statuses if it's not empty + if (!empty($domainDetails['rgpstatus'])) { + $statuses[] = $domainDetails['rgpstatus']; + } + + // If statuses array is empty, add 'ok' to it + if (empty($statuses)) { + $statuses[] = 'ok'; + } + // Query: Get DNSSEC details $stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id"); $stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT); @@ -1570,6 +1580,16 @@ function handleDomainSearchQuery($request, $response, $pdo, $searchPattern, $c, $stmt2->execute(); $statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0); + // Add rgpstatus to statuses if it's not empty + if (!empty($domainDetails['rgpstatus'])) { + $statuses[] = $domainDetails['rgpstatus']; + } + + // If statuses array is empty, add 'ok' to it + if (empty($statuses)) { + $statuses[] = 'ok'; + } + // Query: Get DNSSEC details $stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id"); $stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT); diff --git a/whois/port43/start_whois.php b/whois/port43/start_whois.php index 0c5eb81..c6453b9 100644 --- a/whois/port43/start_whois.php +++ b/whois/port43/start_whois.php @@ -171,8 +171,22 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool $stmt4->bindParam(':domain_id', $f['id'], PDO::PARAM_INT); $stmt4->execute(); + $statusFound = false; + while ($f2 = $stmt4->fetch(PDO::FETCH_ASSOC)) { $res .= "\nDomain Status: " . $f2['status'] . " https://icann.org/epp#" . $f2['status']; + $statusFound = true; + } + + // Check for additional statuses + if (!empty($f['rgpstatus'])) { + $res .= "\nDomain Status: " . $f['rgpstatus'] . " https://icann.org/epp#" . $f['rgpstatus']; + $statusFound = true; + } + + // If no status is found, default to 'ok' + if (!$statusFound) { + $res .= "\nDomain Status: ok https://icann.org/epp#ok"; } $query5 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email