if (isset($_POST['domain'])) $domain = $_POST['domain'];
else $domain = '';
if (($domain == null) || ($domain == "yourdomain.com")) {
echo "Enter domain name into box belov and press the search button to find out if the chosen name is still available";
} else {
echo "You're looking for $domain";
$targetSite = "http://whois.domaintools.com/".$domain;
$WhoisButton = " "; $freeCheck = file("http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$domain"); // copy("http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain=$domain", "xFile.x"); // $freeCheck = file("xFile.x"); $html = implode('', $freeCheck); $StartPos = strpos($html, "requested, ")+11; $EndPos = strpos($html, "by the organization"); if ($EndPos == $null) { $EndPos = strpos($html, "If you would"); }; $inputText = $WhoisButton . substr($html, $StartPos, $EndPos-$StartPos); if ($EndPos == $null) { $inputText = "Error: Invalid Domain Please Search Again."; }; echo " " . $inputText; } ?> |