www.yahoo.com
www.google.com
www.iduhfiuhsduihf.com
www.489u498239832.com
www.whois.net
<?php
// The quickest and worst case of authentication, just makes sure you're the only one to run this script
// http://www.yourdomain.com/resolve.php?pw=YOUR_PASSWORD
$PASSWORD = "yourpassword";
$DOMAINSTXT = "/full/path/to/domains.txt";
function getAddrByHost($host, $timeout = 3) {
$query = `nslookup -timeout=$timeout -retry=1 $host`;
if(preg_match('/\nAddress: (.*)\n/', $query, $matches)) {
return true;
} else {
return false;
}
}
if($pw == $PASSWORD){
$dn = fopen($DOMAINSTXT, "r");
$contents = fread($dn, filesize($DOMAINSTXT));
fclose($dn);
$dns = split("[\n|\r]", $contents);
$amt = count($dns);
$count = 0;
foreach($dns as &$domain){
if(!getAddrByHost($domain)){
echo '<font color="red">Unable to resolve: '.$domain.'</font><br>';
} else {
echo '<font color="green">Resolved: '.$domain.'</font><br>';
}
if(++$count >= $amt) break;
}
unset($domain);
} else {
echo "Invalid Password!";
}
?>
*the exceptional businesses of our esteemed moderators