if ($dom){
include "./whois.inc";
$whoisresult = lookup($dom);
$isavail = $whoisresult[0]; // Contains "1" is it's available, blank if it's registered
$whotext = $whoisresult[1]; // Contains the full response from the server.
#The PRE tags are there to display the results in web browsers without replacing \n with
..its just cleaner and quicker that way. ;)
if ($isavail=="1"){
print "This domain is available!";
}
else
{
print "This domain has been registered.";
}
print "".$whotext."
";
}
?>