| www.RickyMills.com Name: Rick Mills Location: Herts, UK Join Date: Sep 2005
Posts: 3,549
NP$: 817.52 ( Donate)
| Heres my current (modded) copy. It has extra domain options such as LL-L and more, and several new domain extensions. I'm also making a modification to allow you to exclude certain letters...will release that bit at a later date. PHP Code: <?php
/*
SCRIPT CREATED BY MATTHEW @ NAMEPROS.COM -- MODDED BY RICKM @ NAMEPROS.COM
ENJOY!
*/
?>
<form action=available.php method=post>
<table>
<tr>
<td class=bordered2 width=150>Type:</td>
<td class=bordered2 width=150>Limit</td>
<td class=bordered2 width=150>Extension</td>
</tr>
<tr>
<td class=bordered2>
<SELECT NAME="type" class=bordered2>
<option value="LLL">LLL</option>
<option value="LLLL">LLLL</option>
<option value="LLLLL">LLLLL</option>
<option value="LLLLLL">LLLLLL</option>
<option value="NNN">NNN</option>
<option value="NNNN">NNNN</option>
<option value="NNNNN">NNNNN</option>
<option value="NNNNNN">NNNNNN</option>
<option value="L-L">L-L</option>
<option value="N-N">N-N</option>
<option value="LNL">LNL</option>
<option value="LLN">LLN</option>
<option value="NLL">NLL</option>
<option value="LL-L">LL-L</option>
<option value="L-LL">L-LL</option>
<option value="L-L-L">L-L-L</option>
<option value="LLNN">LLNN</option>
<option value="LLLN">LLLN</option>
<option value="LNNN">LNNN</option>
</SELECT></td>
<td class=bordered2><input type=text name=x class=camo size=6 value=250></td>
<td class=bordered2>
<SELECT NAME="ext" class=bordered2>
<option value="COM">.COM</option>
<option value="US">.US</option>
<option value="NET">.NET</option>
<option value="ORG">.ORG</option>
<option value="BIZ">.BIZ</option>
<option value="INFO">.INFO</option>
<option value="CO.UK">.CO.UK</option>
<option value="IN">.IN</option>
</SELECT></td>
</tr>
<tr>
<td class=bordered2 colspan=3><input type=submit value=Scan name=submit class=cloakedbutton></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['submit'], $_POST['type']))
{
function checkdomain($xserver, $xdomain)
{
$sock = @fsockopen($xserver,43) or die("Error connecting to whois server.");
fputs($sock,"$xdomain\r\n");
$result = '';
while(!feof($sock))
{
$result .= fgets($sock,128);
}
fclose($sock);
if(eregi("No match", $result) || eregi("NOT FOUND", $result))
{
return true;
}
else
{
return false;
}
}
// Function
$chars = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9");
//$chars = array("a","b","c","d","e","f","g","h","i","l","m","n","o","p","r","s","t");
$type = trim(strip_tags($_POST['type']));
$ext = trim(strip_tags($_POST['ext']));
$x = intval(trim(strip_tags($_POST['x'])));
echo "<font size=2><br />\n";
$i = 1;
//echo'<table border = "1"><tr bgcolor="#E6FFCC">';
while($x >= $i)
{
///////////////////////////////////////////////////////////////////////////////
// Here is where we generate a random string of 3 in the format XXX
// This can be changed easily to the format LLN with this code instead:
///// $current = $chars[rand(0,25)].$chars[rand(0,25)].rand(0,35);
// Or to L-N with this code:
///// $current = $chars[rand(0,25)]."-".rand(0,9);
// Mix and match. Get what you're looking for! :P
switch($type)
{
case 'L-L':
$current = $chars[rand(0,25)]."-".$chars[rand(0,25)];
break;
case 'N-N':
$current = $chars[rand(26,35)]."-".$chars[rand(26,35)];
break;
case 'NNN':
$current = $chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
case 'NNNN':
$current = $chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
case 'NNNNN':
$current = $chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
case 'NNNNNN':
$current = $chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
case 'LNL':
$current = $chars[rand(0,25)].$chars[rand(26,35)].$chars[rand(0,25)];
break;
case 'LLN':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(26,35)];
break;
case 'NLL':
$current = $chars[rand(26,35)].$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'LLL':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'LL-L':
$current = $chars[rand(0,25)].$chars[rand(0,25)]."-".$chars[rand(0,25)];
break;
case 'L-LL':
$current = $chars[rand(0,25)]."-".$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'L-L-L':
$current = $chars[rand(0,25)]."-".$chars[rand(0,25)]."-".$chars[rand(0,25)];
break;
case 'LLLL':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'LLLLL':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'LLLLLL':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];
break;
case 'LLNN':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
case 'LLLN':
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(26,35)];
break;
case 'LNNN':
$current = $chars[rand(0,25)].$chars[rand(26,35)].$chars[rand(26,35)].$chars[rand(26,35)];
break;
default:
$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];
}
///////////////////////////////////////////////////////////////////////////////
// Here is where we start checking domains
// Feel free to add/remove domains or change whois servers
switch($ext)
{
case 'COM':
case 'NET':
$registry = "whois.nsiregistry.net";
break;
case 'ORG':
$registry = "whois.pir.org";
break;
case 'INFO':
$registry = "whois.afilias.net";
break;
case 'BIZ':
$registry = "whois.biz";
break;
case 'US':
$registry = "whois.nic.us";
break;
case 'CO.UK':
$registry = "whois.nic.uk";
break;
case 'IN':
$registry = "whois.inregistry.net";
break;
default:
$registry = "whois.nsiregistry.net";
}
if(checkdomain($registry, $current.'.'.$ext))
{
echo strtoupper($current)." . ".$ext."<br />";
$i++;
}
ob_flush();
flush();
}
echo "</font>";
}
?> |