array(‘whois.crsnic.net’,’No match for’),
‘.net’ => array(‘whois.crsnic.net’,’No match for’),
‘.org’ => array(‘whois.pir.org’,’No match for’)
);
function return_status($domain, $status)
{
global $extension;
$domain = trim($domain);
$weight = ($status == ‘available’) ? ‘bold’ : ‘normal’;
$color = ($status == ‘available – Recommended’) ? ‘green’ : ‘red’;
$decoration = ($status == ‘invalid’
&& $extension == ‘org’) ? ‘underline’ : ‘none’;
if($status == ‘invalid’ && $extension == ‘org’)
{
$status .= ‘ (Domain .org
WHOIS prevents request)’;
}
/*echo “
$domain is $status!
Buy“;*/
}
?>
0)
{
$domains = explode(“\n”, $_POST[‘domains’].”.”.$_POST[‘extension’]);
//echo ‘
Domain Search Result for ‘.$_POST[‘domains’].’
‘;
//echo (isset($_POST[‘save’])) ? ‘Processing results, Please wait…
‘ : null;
foreach($domains as $domain)
{
unset($buffer);
preg_match(‘@^(http://www\.|http://|www\.)?([^/]+)@i’, $domain, $matches);
$domain = $matches[2];
$tld = explode(‘.’, $domain, 2);
$extension = strtolower(trim($tld[1]));
if(strlen($domain) > 0 &&
array_key_exists(‘.’ . $extension, $ext))
{
$server = $ext[‘.’ .$extension][0];
$sock = fsockopen($server, 43) or
die(‘Error Connecting To Server:’ . $server);
fputs($sock, “$domain\r\n”);
while( !feof($sock) )
{
$buffer .= fgets($sock,128);
}
fclose($sock);
//if($extension == ‘org’) echo nl2br($buffer);
if(eregi($ext[‘.’ . $extension][1], $buffer))
{ ?>
is available
is already taken
Variations you might also consider
0 && array_key_exists(‘.’ . $extension, $ext))
{
//Postfix cehck
foreach($postfix as $postfixd)
{
$domain = $domain_name.$postfixd.”.”.$extension;
$server = $ext[‘.’ .$extension][0];
$sock = fsockopen($server, 43) or
die(‘Error Connecting To Server:’ . $server);
fputs($sock, “$domain\r\n”);
while( !feof($sock) )
{
$buffer .= fgets($sock,128);
}
fclose($sock);
//if($extension == ‘org’) echo nl2br($buffer);
if(eregi($ext[‘.’ . $extension][1], $buffer))
{
//$available[].=$domain;
//return_status($domain, ‘available – Recommended’);
$results[$extension][].=$domain;
}
else
{
}
}
//Prefix check
foreach($prefix as $prefixd)
{
$domain = $prefixd.$domain_name.”.”.$extension;
$server = $ext[‘.’ .$extension][0];
$sock = fsockopen($server, 43) or
die(‘Error Connecting To Server:’ . $server);
fputs($sock, “$domain\r\n”);
while( !feof($sock) )
{
$buffer .= fgets($sock,128);
}
fclose($sock);
//if($extension == ‘org’) echo nl2br($buffer);
if(eregi($ext[‘.’ . $extension][1], $buffer))
{
//return_status($domain, ‘available – Recommended’);
$results[$extension][].=$domain;
}
else
{
}
}
}
}
}
}
else
{
if(strlen($domain) > 0) { return_status($domain, ‘invalid’); }
}
ob_flush();
flush();
sleep(0.1);
}
}
else
{
}
?>
0)
{?>
Popular Domain Options | |||
.com | The most popular domain. Do you have your? | ||
.co | Great alternative to .com | ||
.info | Put your information on web | ||
.net | Get this also to protect your name | ||
.org | Perfect for your non-profit. |