whois.php
PHP Bulk Whois Tools

Create Date : 1397/01/21 - 11:23
Download Code View Raw

Embed Code

<?php
error_reporting(0);
ob_start();

if ($_POST) {
	$total_count 	= $_POST['total_count'];
	$string_count 	= $_POST['string_count'];
	$string_prefix 	= $_POST['string_prefix'];
	$string_suffix 	= $_POST['string_suffix'];
	$string_chars 	= $_POST['string_chars'];
} else {
	$string_chars 	= "qwertyuiopasdfghjklzxcvbnm";
}

echo '<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Bulk Domain Checker</title>
<style>* { font-family:tahoma; } body { font-family:tahoma; font-size:12px; } input { margin:2px; padding:2px; } select { margin-bottom:2px; margin-left:2px; padding:5px; font-size:11px; } textarea { padding:4px; }</style>
<center>
	<form method="post" action="" id="form">
		<table border="0">
			<tbody>
				<tr>
					<td style="text-align:left;">
						<select name="total_count">
							<option value="0">Number of random domains</option>';

								for ($x = 1; $x <= 100; $x++) { ?><option value="<?php echo $x; ?>" <?php if($total_count == $x) echo 'selected'; ?>><?php echo $x; ?></option><?php }

					echo '</select><br>
						<input type="number" name="string_count"  value="'. $string_count .'" placeholder="String Length" max="253"><br>
						<input type="text"   name="string_prefix" value="'. $string_prefix .'" placeholder="prefix"><br>
						<input type="text"   name="string_suffix" value="'. $string_suffix .'" placeholder="suffix"><br>
						<input type="text"   name="string_chars"  value="'. $string_chars .'" placeholder="Random Characters" ><br>
					</td>
					<td style="text-align:left;">
						<textarea id="Search" name="domains" dir="ltr" cols="45" rows="8" style="text-align:left;" placeholder="Enter Domain Pre Line ...">'. $_POST["domains"] .'</textarea>
					</td>
					<td style="text-align:left;">';
						?>
					
							<input type="checkbox" name="ir"   value="1" <?php if($_POST['ir']   == 1) echo 'checked'; if(!$_POST) echo 'checked'; ?>>IR<br>
							<input type="checkbox" name="in"   value="1" <?php if($_POST['in']   == 1) echo 'checked'; ?>>IN<br>
							<input type="checkbox" name="me"   value="1" <?php if($_POST['me']   == 1) echo 'checked'; ?> disabled>ME<br>
							<input type="checkbox" name="biz"  value="1" <?php if($_POST['biz']  == 1) echo 'checked'; ?>>BIZ<br>
							<input type="checkbox" name="net"  value="1" <?php if($_POST['net']  == 1) echo 'checked'; ?>>NET<br>
							<input type="checkbox" name="com"  value="1" <?php if($_POST['com']  == 1) echo 'checked'; ?>>COM<br>
							<input type="checkbox" name="org"  value="1" <?php if($_POST['org']  == 1) echo 'checked'; ?>>ORG<br>
							<input type="checkbox" name="info" value="1" <?php if($_POST['info'] == 1) echo 'checked'; ?>>INFO<br>
							
						<?php
					echo '</td>
				</tr>
				<tr>
					<td style="text-align:left;"><input id="Submit" type="submit" value="Check Now!"></td>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
			</tbody>
		</table>
	</form>
</center>';

if (isset($_POST['domains']) && $total_count > 0) {
	for ($x = 1; $x <= $total_count; $x++) {
		
		if ($string_count == 0)
			$string_count = rand(3,25);
		
		$random_string = substr(str_shuffle(str_repeat($string_chars, $string_count)), 0, $string_count);

		if (!in_array($random_string, $random_string_array)) {
			$random_domain_list[] = $string_prefix . $random_string . $string_suffix;
		}
		
		$random_string_array[] = $random_string;
	}

	$domain_list = $_POST['domains'] ."\r\n". implode("\r\n",$random_domain_list);
} else {
	$domain_list = (isset($_POST['domains'])) ? $_POST['domains'] : '';
}

if($domain_list) {

	$extensions = array(
		'.ir' 		=> array('whois.nic.ir','no entries found'),
		'.in' 		=> array('whois.inregistry.in','NOT FOUND'),
		'.me' 		=> array('whois.meregistry.net','NOT FOUND'),
		'.com' 		=> array('whois.verisign-grs.com','No match for'),
		'.info' 	=> array('whois.afilias.info','NOT FOUND'),	
		'.net' 		=> array('whois.verisign-grs.com','No match for'),
		'.org' 		=> array('whois.pir.org','NOT FOUND'),
		'.biz' 		=> array('whois.nic.biz','Not found'),
	);
	
	$i 					= 0;
	$available_i 		= 0;
	$not_available_i 	= 0;
	
	echo '<hr>';

	foreach(explode("\r\n", $domain_list) as $domain) {
		
		$i++;

		$domain = str_replace(array('www.', 'http://', ' '), NULL, $domain);
		
		if(strlen($domain) > 0)
		{
			foreach($extensions as $extension => $who)
			{
				
				$extensionnodot = str_replace('.', '', $extension);
				
				if ($_POST[$extensionnodot] == 1) {

					$buffer = NULL;

					$sock = fsockopen($who[0], 43) or die('Error Connecting To Server:' . $who[0]);
					fputs($sock, $domain.$extension . "\r\n");

					while(!feof($sock)) { $buffer .= fgets($sock,128); }

					fclose($sock);

					if(eregi($who[1], $buffer))
					{
						//echo "<b><p><span style='color:#00AA11;'>:-) You Can Register this Domain &nbsp;: </span>$domain<span style='color:#0026FF;'>$extension</span></p></b>";
						$domain_available[] = $domain .'.'. $extensionnodot;
					} else {
						//echo "<b><p><span style='color:#FF0000;'>Sorry this domain is not available : </span>$domain<span style='color:#0026FF;'>$extension</span></p></b>";
						$domain_not_available[] = $domain .'.'. $extensionnodot;
					}

					ob_flush();
					flush();
					sleep(0.3);
				}
			}
		}
	}

	// Show Available Domains
	foreach ($domain_available as $key => $value) {
		
		$available_i++;
		
		echo "<b><p><span style='color:#00AA11;'>:-) You Can Register this Domain &nbsp;: </span>$value</p></b>";
	}
	
	// Show NOT Available Domains
	foreach ($domain_not_available as $key => $value) {
		
		$not_available_i++;
		
	   echo "<b><p><span style='color:#FF0000;'>Sorry this domain is not available : </span><a href='https://who.is/whois/$value' target='_blank' style='color:#404040;'>[WHOIS]</a> <a href='http://$value' target='_blank' style='color:#0094FF;'>$value</a></p></b>";
	}
	
	if ($available_i == 0 && $not_available_i == 0)
		$i = 0;
	
	if ($i > 0) {
		$loading = '';
		echo "========================================================================<br>";
		echo "Total <b style='color:#0000FF;'>$i</b> Domain Checked - <b style='color:#00AA11;'>$available_i Domain Available</b> AND <b style='color:#FF0000;'>$not_available_i Domain NOT Available</b>";
	}
}
?>
<a href="http://miladworkshop.ir" style="color:#FFFFFF;" target="_blank">
	<div style="position:fixed; left:0px; bottom:0px;  width:100%; background:#151515; color:#FFFFFF; text-align:center; font-family:tahoma; font-siz:10px; padding:8px;">
		Designed and coded by MiladWorkShop
	</div>
</a>
Powered By MiladWorkShop PasteCode System