NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Available 3-Character Domain Scanner

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 03-06-2006, 01:57 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
Jim_'s Avatar
Join Date: Aug 2005
Location: NY, USA
Posts: 610
Jim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to behold
 


Save The Children

Available 3-Character Domain Scanner


I was bored and happened to make this script.
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 Code:
<?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--; }
????: NamePros.com http://www.namepros.com/code/174138-available-3-character-domain-scanner.html

  if(
checkdomain("whois.biz",$current.".biz")) {
    echo 
$current.".BIZ\n<br />"$i--; }
????: NamePros.com http://www.namepros.com/showthread.php?t=174138

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

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

echo "</div>";
?>
__________________
ask me about the internet
Last edited by Jim_; 03-18-2006 at 11:08 AM.
Jim_ is offline  
Old 03-18-2006, 11:10 AM THREAD STARTER               #2 (permalink)
NamePros Regular
 
Jim_'s Avatar
Join Date: Aug 2005
Location: NY, USA
Posts: 610
Jim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to behold
 


Save The Children
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 Code:
<?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))
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
  
$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 />"; }
????: NamePros.com http://www.namepros.com/showthread.php?t=174138

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

  
ob_flush();
  
flush();
}

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

echo "</div>";
?>
__________________
ask me about the internet
Last edited by Jim_; 03-23-2006 at 12:53 PM.
Jim_ is offline  
Old 03-23-2006, 01:47 AM   #3 (permalink)
If only you knew...
 
maximum's Avatar
Join Date: Oct 2005
Location: Inside your head...
Posts: 998
maximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond reputemaximum has a reputation beyond repute
 


Child Abuse Special Olympics Save a Life Baby Health Autism

Talking nice


ty: had one simular, but mine was alot more of the "long and hard way" about doing it Maybe add this to my whois, for "simular domains" searches
__________________
--- The greatest truths ever told, and the greatest lies ever told, all consist of exactly the same three words:
"I LOVE YOU"
--- The best say little, only say what is important.....then they shut up and sit down.
maximum is offline  
Old 03-24-2006, 10:49 AM   #4 (permalink)
Exclusive
 
Razvan's Avatar
Join Date: Mar 2006
Location: ro
Posts: 536
Razvan is a jewel in the roughRazvan is a jewel in the roughRazvan is a jewel in the rough
 



Really nice script


added some rep
Razvan is offline  
Old 04-09-2006, 01:24 AM   #5 (permalink)
Exclusive
 
Razvan's Avatar
Join Date: Mar 2006
Location: ro
Posts: 536
Razvan is a jewel in the roughRazvan is a jewel in the roughRazvan is a jewel in the rough
 



Jim, can you make it scan for .EU domains ?
Razvan is offline  
Old 04-09-2006, 01:55 AM   #6 (permalink)
NamePros Regular
Join Date: Mar 2006
Posts: 397
sacx13 is on a distinguished road
 




EU dosen't have a whois server ... try to find a www server for whois querys.

Regards
sacx13 is offline  
Old 04-09-2006, 02:14 AM   #7 (permalink)
Account Closed
Join Date: Feb 2006
Posts: 109
RYANNNNN is an unknown quantity at this point
 



Where can I find lists?
RYANNNNN is offline  
Old 04-09-2006, 02:53 AM   #8 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Jim_, if you don't mind; I've updated it just a tad:
PHP Code:
<?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($xserver43) 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($sock128);
  }
  
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();
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
  
flush();
}

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

echo "</div>";

?>
Eric is offline  
Old 04-09-2006, 03:29 AM   #9 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
Nice Script

I updated to work with .eu

PHP Code:
<?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
????: NamePros.com http://www.namepros.com/showthread.php?t=174138

function checkdomain($xserver$xdomain)
{
  
$sock = @fsockopen($xserver43) 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($sock128);
  }
  
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
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
  // 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>";

?>
__________________
Webmaster Words
Last edited by Amnezia; 04-09-2006 at 03:41 AM.
Amnezia is offline  
Old 04-09-2006, 04:43 AM   #10 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,927
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
well so does it looks for all the domains at once???

Wouldn't the whois server get bogged?
-Nick- is offline  
Old 04-09-2006, 09:09 AM   #11 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
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
__________________
Webmaster Words
Amnezia is offline  
Old 04-09-2006, 08:13 PM   #12 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,927
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
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.
-Nick- is offline  
Old 04-13-2006, 04:49 PM   #13 (permalink)
Resistance is Futile
 
Kadenz's Avatar
Join Date: Apr 2006
Location: Montreal, Canada
Posts: 1,094
Kadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to all
 



Wildlife Lou Gehrig's Disease (ALS)
Pretty sweet script, now I can get 3 letter domains easily!
__________________
Freelance Web Developer
PHP, MySQL, XHTML, CSS, Javascript, jQuery, Wordpress
Portfolio: www.bundy.ca
Kadenz is offline  
Old 04-14-2006, 08:11 PM   #14 (permalink)
NamePros Regular
 
Something Vague's Avatar
Join Date: Mar 2006
Posts: 887
Something Vague is a jewel in the roughSomething Vague is a jewel in the roughSomething Vague is a jewel in the rough
 



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?
Something Vague is offline  
Old 04-15-2006, 02:33 AM   #15 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
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?
__________________
Webmaster Words
Amnezia is offline  
Old 04-15-2006, 02:51 AM   #16 (permalink)
NamePros Legend
 
weblord's Avatar
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,785
weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness
 


Autism Protect Our Planet
this one's a wonderful/superb script
__________________
Nabaza.com - Amaia
weblord is offline  
Old 04-15-2006, 06:11 AM   #17 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,796
RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future
 


Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
This is a great script! Nice work to Jim and all others who improved it Rep added to all of you
__________________
RickM

Web Design Forums - Over 22,000 Web Designers & Programmers just like you!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!
RickM is offline  
Old 04-15-2006, 11:06 AM   #18 (permalink)
Senior Member
 
Shorty's Avatar
Join Date: Sep 2005
Location: England
Posts: 1,034
Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice
 



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.
????: NamePros.com http://www.namepros.com/showthread.php?t=174138

Code:
Code removed
Last edited by Shorty; 05-31-2006 at 11:23 AM.
Shorty is offline  
Old 04-15-2006, 11:20 AM   #19 (permalink)
NamePros Regular
Join Date: Mar 2006
Location: Connecticut, USA
Posts: 281
Darkneoboi is an unknown quantity at this point
 



If i used the last script posted what would I name it?

Edit: I named that last script available.php but I get
PHP Code:
Parse errorsyntax errorunexpected $end in /home/neokid90/public_html/available.php on line 99 
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
__________________
DarkNeoNetwork
Last edited by Darkneoboi; 04-15-2006 at 11:24 AM.
Darkneoboi is offline  
Old 04-15-2006, 11:46 AM   #20 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Shorty, cool

I've not tested it, but cleaned it up a little :
PHP Code:
<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']))
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
{
  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)];
????: NamePros.com http://www.namepros.com/showthread.php?t=174138
           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 by SecondVersion; 04-15-2006 at 11:50 AM.
Eric is offline  
Old 04-15-2006, 11:48 AM   #21 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
the code wont work on godaddy because i assume they disable f_sock() lol
__________________
Webmaster Words
Amnezia is offline  
Old 04-24-2006, 02:52 AM   #22 (permalink)
NamePros Regular
Join Date: May 2003
Location: Europa
Posts: 245
dotNAMES is an unknown quantity at this point
 



Be aware that if you scan huge list of domains, your IP maybe banned from Whois servers. Maybe time to add a "proxy" feature
__________________
www.dotNames.com
May consider any $XX,XXX offers :love:
dotNAMES is offline  
Old 06-29-2006, 03:56 PM   #23 (permalink)
NamePros Regular
 
malcolm321's Avatar
Join Date: Jun 2006
Posts: 255
malcolm321 is an unknown quantity at this pointmalcolm321 is an unknown quantity at this point
 



I tried to upload this to my host. It didn't work. Do I have to add something to my code? It takes me to a 404.

Derek
malcolm321 is offline  
Old 06-29-2006, 05:32 PM   #24 (permalink)
NamePros Member
Join Date: Apr 2006
Location: Central PA
Posts: 101
NonProphet is on a distinguished road
 



Thanks for sharing. I've been makin one in Visual Basic but I haven't finished it yet, guess now I don't have to =P.
NonProphet is offline  
Old 06-29-2006, 06:07 PM   #25 (permalink)
NamePros Regular
 
malcolm321's Avatar
Join Date: Jun 2006
Posts: 255
malcolm321 is an unknown quantity at this pointmalcolm321 is an unknown quantity at this point
 



How come I have a 404 error? HELP

Derek
malcolm321 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redemption Grace Period TopNames.com Domain Newbies 1 07-31-2007 12:04 PM
Guide to Selecting Nice Domains -Nick- Domain Name Discussion 12 01-26-2006 04:14 AM
List of domains are they good free-everything.com Domain Name Discussion 10 08-07-2005 09:54 AM
domain names unknowngiver Domain Newbies 9 06-02-2005 08:34 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:45 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger