|
include ("header.php");
/* Please set the following variables to match your web site */
// Background color of the top row of entry table
$topbackground = "#ffffff";
// Selected font color for top row of entry table
$topfontcolor = "#FFFFFF";
// Background color of the bottom row of entry table
$bottombackground = "#FFFFFF";
// Selected font color for bottom row of entry table
$bottomfontcolor = "#000000";
// Border color of your entry table
$border = "#000000";
function whois ($a_server, $a_query, $a_port=43)
{
$available = "No match";
$a_query = str_replace("www.", "", $a_query);
$a_query = str_replace("http://", "", $a_query);
$sock = fsockopen($a_server,$a_port);
IF (!$sock)
{
echo ("Could Not Connect To Server.");
}
fputs($sock,"$a_query\r\n");
while(!feof($sock))
$result .= fgets($sock,128);
fclose($sock);
IF (eregi($available,$result))
{
echo ("$a_query is available.");
}
ELSE
{
echo ("$a_query is not available.");
}
}
IF ($query != "")
{
IF (!eregi(".com",$query) AND !eregi(".net",$query) AND !eregi(".org",$query))
{
echo ("You must specify a .com, .net, or .org domain name.");
}
ELSE
{
$server = "whois.internic.net";
whois($server,$query);
}
}
ELSE IF (isset($query))
{
echo ("Domain name left blank. Please fill in a domain name and try again.");
}
?>
include ("tld_check_form.php");
include ("footer.php");
?>
|