function checkNS($domain) { global $nsnames; $nscount = count($nsnames); exec("nslookup -query=ns $domain", $dns); $temp = implode(" ", $dns); $count = substr_count($temp[0], "nameserver ="); echo $temp.'

'; for ($x = 0; $x < $count;$x++) { $temp = substr($temp, strpos($temp, 'nameserver =') +12); $ns[$x] = substr($temp, 1, strpos($temp, '. ') -1); echo 'Nameserver '.$x.' is: '.$ns[$x].'
'; } // REMOVE LINE AFTER SITE GOES LIVE // return true; for ($y = 0; $y < $count; $y++) { $good =0; for ($z = 0; $z < $nscount; $z++) { if ($ns[$y] == $nsnames[$z]) { $good =1; } } if (!$good) { return false; } } return true; }