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
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ function getDomainRecords($name) {
return $records; 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['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['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); $records['mx'] = substr(trim(strip_tags(shell_exec("dig +short MX $domain"))), 0, 254);