UXDE dot Net Wordpress Themes

4 character long available domain name generator

Posted by on

Recently I developed a script to find 4 character long  available domain name. We all know that 4 character long available domain name is very difficult to find. Generally all normal keywords are already registered. So I planned to develop an application using that I can search 4 character available domains.

I wrote this script to randomly generate 4 character long available domain names with combination of alphabets a-z and numbers 0-1. In this script I assumed that pronounce ability would not be a major factor because all pronounceable domains are already get registered. And the results were what I was expecting:

  • Random a-z domain name generation : 100 %
  • Random a-z + 0-1 domain name generation : 100%

Because the processes of this script is utilizing lot of server resources. So I planned to develop a lighter version of 4 character long available domain name generator for you and this lighter version of script will generate list of 10 available 4 character domain names randomly. After every page refresh you will get new list of 4 letter domains.

This 4 character long available domain name generator script is currently configured to find .IN, .COM, .NET, .ORG, .INFO, .BIZ and .US domains but you can easily customize this to look for other domain extensions. To customize this for any other extension you need to add /delete that extension according to all extensions written in script:


if(checkdomain("whois.nsiregistry.net",$current.".com")) {

echo $current.".COM\n<br />"; $i--; }

Now I am going to share that script with you . Save this script as php file and host this file on your hosting server or in your localhost server (To run this application from your localhost server you need to be connected with internet). You can download this script from the given link.

4 character long available domain name :

<?php
 ///////////////////////////////////////////////////////////////////////////////
 // Amit Blogbl's 4-Character Domain Scanner Script
 // amitkr.cs@|gmail.com - http://www.amitkr.in
 //
 //
 // Scans for .IN,.COM, .NET, .ORG, .INFO, .BIZ, .US domains
 // Easily configured for more.
 //
 // I make no guarantee of the validity of these results.
 //
 // For a list of whois servers, check out:
 //http://www.domaininformation.de/whoisserver_list.html
 //http://www.mit.edu/afs/athena/contrib/potluck/Net-Services/whois-servers.list
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
 // This is the number of domains the script will stop at.
 // Try not to set it too high. You'll upset your host and the nameservers

$i = 10;

///////////////////////////////////////////////////////////////////////////////
 // Here is the function for checking the availability of a domain

function checkdomain($xserver, $xdomain) {
 $sock = fsockopen($xserver,43) or die("Error Connecting To Whois Server");
 fputs($sock,"$xdomain\r\n");
 while(!feof($sock))
 $result .= fgets($sock,128);
 fclose($sock);
 if(eregi("No match",$result)||eregi("NOT FOUND",$result))
 return true;
 else
 return false;
 }

///////////////////////////////////////////////////////////////////////////////
 // Here is the array that we will pull random characters from

$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");

///////////////////////////////////////////////////////////////////////////////
 // Here is some boring HTML/CSS. :P 

echo "<style>.domains {font-size: 10px;font-family:Tahoma;color:black;font-weight:bold;}</style>
 <div class=\"domains\"><u>Scanned and found</u> ".$i." <u>domains</u>:<br />\n";

///////////////////////////////////////////////////////////////////////////////
 // Now, let's start scanning!

while($i > 0){

///////////////////////////////////////////////////////////////////////////////
 // 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 

$current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,35)].$chars[rand(0,35)];

///////////////////////////////////////////////////////////////////////////////
 // Here is where we start checking domains
 // Feel free to add/remove domains or change whois servers

if(checkdomain("whois.nsiregistry.net",$current.".com")) {
 echo $current.".COM\n<br />"; $i--; }

if(checkdomain("whois.inregistry.net",$current.".in")) {
 echo $current.".IN\n<br />"; $i–; }

if(checkdomain("whois.nsiregistry.net",$current.".net")) {
 echo $current.".NET\n<br />"; $i--; }

if(checkdomain("whois.pir.org",$current.".org")) {
 echo $current.".ORG\n<br />"; $i--; }

if(checkdomain("whois.afilias.net",$current.".info")) {
 echo $current.".INFO\n<br />"; $i--; }

if(checkdomain("whois.biz",$current.".biz")) {
 echo $current.".BIZ\n<br />"; $i--; }

if(checkdomain("whois.nic.us",$current.".us")) {
 echo $current.".US\n<br />"; $i--; }
 ob_flush();
 flush();
 }

///////////////////////////////////////////////////////////////////////////////
 // We're done! :) 

echo "</div>";
 ?>
 <a href="http://www.blogbl.com">Learn n Earn</a> | <a href="http://www.hostingly.com">Hosting Details</a> |<a href="http://www.amitkr.in">Amit Kumar</a>

Download : 4 character long available domain name generator (323)

If you accidently come accross an interesting domain using it, be sure to tell me.

About the Author

Amit Kumar is a web developer. He intends to make the web a friendlier place by sharing stuffs and articles which will help other webmasters and bloggers to become successful.

15 Comments to 4 character long available domain name generator

    • amit

      Thanks Sagar for visiting my newly started blog .. :)

      you can also convert this script to find 3/5/6 charecter long domain .. :)

    • amit

      Thanks Tushar ;)

      For better result customize this script

      eg.

      $current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,35)].$chars[rand(0,35)];

      if you want to check only alphabets then replace 35 with 25 , here 25 means only alphabet and 35 means alphabet + numbers :)

      like-

      $current = $chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)].$chars[rand(0,25)];

  1. Ankit

    A real real nice script. I tried and its working like charm. Hope you’ll not mind the name i kept in comments :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>