<div class="subHead">Domain Purchase</div>
<div class="padding">
Check to see if the domain name you wish to purchase is available:
<br />
<? $d=str_replace(" ","",$_POST['domain']); ?>
<form name="checkdomain" action="" method="POST">
<input type="text" name="domain" size="27" value="<? print $d; ?>">
<input type="submit" value="Check"><br />
Ex: mydomain.com
</form><br />
<?
if(isset($_POST['domain'])) {
ob_start();
@readfile("http://www.whois.net/whois.cgi2?d=".$d);
$content=strip_tags(ob_get_contents());
ob_end_clean();
if(strstr($content,"No match") || strstr($content,"Not found:")) {
$r='<span style="color:#00AA00;">Available</span>';$a=true;
} else if(strstr($content,"is registered") || strstr($content,"WHOIS information")) {
$r='<span style="color:#AA0000;">Registered</span>';
} else {
$r='an <span style="color:#0000AA;">Invalid Domain</span>';
}
print '<b>'.$_POST['domain'].' is '.$r.'!</b><br /><br />';
}
if($a) {
?>
<div style="display:table;text-align:center;margin-left:10px;padding:4px;" class="subContent">
<b>You can purchase it here:</b><br />
paypal link
</div><br /><br />
<? } ?>
</div>