From a812abb3b7dac9c0e065f1cbd5a2eda86f73dcbc Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Jul 2010 20:57:48 -0400 Subject: Teach the DNS Lookup util to grok multiple host entries --- usr/local/www/diag_dns.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index d1392d3..94cd630 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -82,6 +82,8 @@ if ($_POST) { } elseif (is_hostname($host)) { $type = "hostname"; $resolved = gethostbyname($host); + $dig=`dig www.cnn.com A | grep "www.cnn.com" | grep -v ";" | awk '{ print $5 }'`; + $resolved = split("\n", $dig); $hostname = $host; if ($host != $resolved) $ipaddr = $resolved; @@ -108,10 +110,26 @@ include("head.inc"); ?> - + + + +
+ + - = + = +"; + } + } else { + echo $resolved; + } +?> + +
-- cgit v1.1