views:

29

answers:

1

I need a script to find out what is the lowest available domain name with a give TLD (say .com, .info, or .net).

For example, 1000423.com is free but 1000.com is taken.

Probably my spammiest question so far.

NOTE

I mean "lowest" domain name numerically (i.e. 1.com, 2.com, 3.com, ..., n.com, n+1.com, ...) and not shortest as in String.length.

+4  A: 

In your web-capable language of choice:

  1. Ask the user for a top-level domain name.
  2. i <- 0.
  3. Send out an HTTP GET to a registrar to see if "i.(tld)" is taken.
  4. If it's not taken, notify the user and quit.
  5. i <- i + 1.
  6. Go to step 2.

You may need to add a loop delay to avoid the registrar thinking that you're trying to do a DOS attack.

Unfortunately, as far as I know, there's no central repository saying that a certain domain name is or isn't for sale. You'll have to look up a domain name and see if it's owned by any of the major domain name vendors (GoDaddy, etc.)

Reinderien
I meant lowest **numerically** and not shortest by string length - I'll fix that.
flybywire