Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Available 3-Character Domain Scanner

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Jim_

Established Member
Impact
33
I was bored and happened to make this script. :P
It randomly scans for available 3-character domain names. It is currently configured to find COM, NET, ORG, INFO, BIZ, and US domains, but can easily be configured to look for others.

If you happen to accidently come accross an interesting domain using it, be sure to tell me :) Enjoy.
PHP:
<?php 
///////////////////////////////////////////////////////////////////////////////
// Jim's 3-Character Domain Scanner Script
// bellys|@|gmail|.|com - http://www.j-fx.ws
//
//
// Scans for .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 = 25; 

///////////////////////////////////////////////////////////////////////////////
// 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,35)].$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.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>";
?>
 
Last edited:
2
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I updated the above script, adding ob_flush() to send domains to the user as they are generated.

I've also made a version that scans a list of domains:
PHP:
<?php
///////////////////////////////////////////////////////////////////////////////
// Jim's List Domain Scanner Script
// bellys|@|gmail|.|com - http://www.j-fx.ws
//
//
// Scans for .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 textfile containing the list of words you'll be scanning

$listfile = "./thelist.txt"; 

///////////////////////////////////////////////////////////////////////////////
// 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 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><br />\n";

///////////////////////////////////////////////////////////////////////////////
// Now, let's open the word list start scanning!

$thelist = file($listfile);

foreach($thelist as $thisword) {

///////////////////////////////////////////////////////////////////////////////
// Pick a word and remove line break characters

  $current = str_replace("\r","",str_replace("\n","",$thisword));

///////////////////////////////////////////////////////////////////////////////
// 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 />"; }

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

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

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

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

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

  ob_flush();
  flush();
}

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

echo "</div>";
?>
 
Last edited:
2
Close
nice

ty: had one simular, but mine was alot more of the "long and hard way" about doing it :td: Maybe add this to my whois, for "simular domains" searches :)
 
0
Close
Really nice script :)


added some rep :)
 
0
Close
Jim, can you make it scan for .EU domains ?
 
0
Close
EU dosen't have a whois server ... try to find a www server for whois querys.

Regards
 
0
Close
Where can I find lists?
 
0
Close
Jim_, if you don't mind; I've updated it just a tad:
PHP:
<?php
///////////////////////////////////////////////////////////////////////////////
// Jim's List Domain Scanner Script
// bellys|@|gmail|.|com - http://www.j-fx.ws
//
//
// Scans for .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 textfile containing the list of words you'll be scanning

$listfile = "./thelist.txt";

///////////////////////////////////////////////////////////////////////////////
// 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");
  
  //If PHP is configured to output Notices (god knows why) w/o this, it will
  //generate a notice
  $result = '';
  
  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 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><br />\n";

///////////////////////////////////////////////////////////////////////////////
// Now, let's open the word list start scanning!

$thelist = @file($listfile);

foreach($thelist as $thisword)
{
  ///////////////////////////////////////////////////////////////////////////////
  // Pick a word and remove line break characters

  $current = str_replace(array("\r", "\n"), array("", ""), $thisword);

  ///////////////////////////////////////////////////////////////////////////////
  // 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 />";
  }
  if(checkdomain("whois.nsiregistry.net", $current.".net"))
  {
    echo $current.".NET\n<br />";
  }
  if(checkdomain("whois.pir.org", $current.".org"))
  {
    echo $current.".ORG\n<br />";
  }
  if(checkdomain("whois.afilias.net", $current.".info"))
  {
    echo $current.".INFO\n<br />";
  }
  if(checkdomain("whois.biz", $current.".biz"))
  {
    echo $current.".BIZ\n<br />";
  }
  if(checkdomain("whois.nic.us", $current.".us"))
  {
    echo $current.".US\n<br />";
  }
  ob_flush();
  flush();
}

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

echo "</div>";

?>
 
1
Close
Nice Script

I updated to work with .eu :)

PHP:
<?php
///////////////////////////////////////////////////////////////////////////////
// Jim's List Domain Scanner Script
// bellys|@|gmail|.|com - http://www.j-fx.ws
//
//
// Scans for .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 textfile containing the list of words you'll be scanning

$listfile = "./thelist.txt";

///////////////////////////////////////////////////////////////////////////////
// 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");
  
  //If PHP is configured to output Notices (god knows why) w/o this, it will
  //generate a notice
  $result = '';
  
  while(!feof($sock))
  {
    $result .= fgets($sock, 128);
  }
  fclose($sock);

  if(eregi("No match", $result) || eregi("NOT FOUND", $result)||eregi("FREE",$result))
  {
    return true;
  }
  else
  {
    return false;
  }
}

///////////////////////////////////////////////////////////////////////////////
// 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><br />\n";

///////////////////////////////////////////////////////////////////////////////
// Now, let's open the word list start scanning!

$thelist = @file($listfile);

foreach($thelist as $thisword)
{
  ///////////////////////////////////////////////////////////////////////////////
  // Pick a word and remove line break characters

  $current = str_replace(array("\r", "\n"), array("", ""), $thisword);

  ///////////////////////////////////////////////////////////////////////////////
  // 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 />";
  }
  if(checkdomain("whois.nsiregistry.net", $current.".net"))
  {
    echo $current.".NET\n<br />";
  }
  if(checkdomain("whois.pir.org", $current.".org"))
  {
    echo $current.".ORG\n<br />";
  }
  if(checkdomain("whois.afilias.net", $current.".info"))
  {
    echo $current.".INFO\n<br />";
  }
  if(checkdomain("whois.biz", $current.".biz"))
  {
    echo $current.".BIZ\n<br />";
  }
  if(checkdomain("whois.nic.us", $current.".us"))
  {
    echo $current.".US\n<br />";
  }
  if(checkdomain("whois.eu", $current.".eu"))
  {
    echo $current.".EU\n<br />";
  }
  ob_flush();
  flush();
}

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

echo "</div>";

?>
 
Last edited:
1
Close
well so does it looks for all the domains at once???

Wouldn't the whois server get bogged?
 
0
Close
no, if you run the script you see that it only queries one whois server at a time and then moves on to the next, its not multithreaded :hehe:
 
0
Close
Well I have a script which automatically moves on to the next entry.

And if the domain is available it can send us an email or do anything that is required.

5 secs for one lookup I have kept the time interval.
 
0
Close
Pretty sweet script, now I can get 3 letter domains easily! :D
 
0
Close
Hey,

Wonderful script. Enjoyed it, and the modifications done with it. Been a fan of it since it was first posted. Can someone please explain, though, why Jim_ mentioned this;

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

How does this upset my host, and nameservers? I know the page loads oddly, will my host know that I am doing something like this?
 
0
Close
alot of hosts dont like it when you run long looping scripts. If you are only running instance at a time then it should be fine.

Also most of the whois servers have hourly query limits on them. If you exceed this limit then you get a temporary ban. If you are on shared hosting then this ban extends to everyone who uses the same IP as you. The query limit on whois.eu is 100 per hour, im not sure what the limits are on the other whois servers maybe someone else can clarify this?
 
0
Close
this one's a wonderful/superb script :)
 
0
Close
This is a great script! Nice work to Jim and all others who improved it :) Rep added to all of you :p
 
0
Close
I made my own little twist on this, it's basically a form where you choose the type of domain you want (like LLL, LNL etc) then select an extension. Curiously enough the code works on my localhost but not on my GoDaddy hosting account, anybody know why?

Also Jim_ I removed your comments during development, but i'm not going to pretend it's all my work since i'm posting here and all. All credit still goes to you...Thanks for it. ;)

Code:
Code removed
 
Last edited:
0
Close
If i used the last script posted what would I name it?

Edit: I named that last script available.php but I get
PHP:
Parse error: syntax error, unexpected $end in /home/neokid90/public_html/available.php on line 99
 
Last edited:
0
Close
Shorty, cool :)

I've not tested it, but cleaned it up a little :p :
PHP:
<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 VALUE="LLLL">LLLL
    <OPTION VALUE="LLLLL">LLLLL
    <OPTION VALUE="LLLLLL">LLLLLL
    <OPTION VALUE="NNN">NNN
    <OPTION VALUE="NNNN">NNNN
    <OPTION VALUE="NNNNN">NNNNN
    <OPTION VALUE="NNNNNN">NNNNNN
    <OPTION VALUE="L-L">L-L
    <OPTION VALUE="N-N">N-N
    <OPTION VALUE="LNL">LNL
  </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 VALUE="US">.US
    <OPTION VALUE="NET">.NET
    <OPTION VALUE="ORG">.ORG
    <OPTION VALUE="BIZ">.BIZ
    <OPTION VALUE="INFO">.INFO
  </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");

  $type = trim(strip_tags($_POST['type']));
  $ext = trim(strip_tags($_POST['ext']));
  $x = intval(trim(strip_tags($_POST['x'])));

  echo "
  <table>
  <tr>
    <td class=bordered2 width=462>Scanning: $type .$ext - Limit $x</td>
  </tr>
  </table>
  <font size=1><br />\n";

  $i = 1;

  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 'LLL':
           $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;
      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;
      default:
              $registry = "whois.nsiregistry.net";
    }

    if(checkdomain($registry, $current.'.'.$ext))
    {
      echo "
      <table>
      <tr>
        <td class=bordered2 width=40>$i. </td>
        <td class=bordered2 width=416>";
        echo strtoupper($current).".$ext </td>
      </tr>
      </table>";
      $i++;
    }
    ob_flush();
    flush();
  }
  echo "</font>";
}

?>
 
Last edited:
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back