Strip www. from domain names when performing whois lookups

This commit is contained in:
Marcus Hill
2023-02-08 19:32:03 +00:00
parent 6db23b9bf8
commit e16cd2aae2

View File

@@ -390,7 +390,7 @@ function getDomainRecords($name) {
return $records;
}
$domain = escapeshellarg($name);
$domain = escapeshellarg(str_replace('www.', '', $name));
$records['a'] = substr(trim(strip_tags(shell_exec("dig +short $domain"))), 0, 254);
$records['ns'] = substr(trim(strip_tags(shell_exec("dig +short NS $domain"))), 0, 254);
$records['mx'] = substr(trim(strip_tags(shell_exec("dig +short MX $domain"))), 0, 254);