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.
Pro开发者_运维百科bably 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.
In your web-capable language of choice:
- Ask the user for a top-level domain name.
- i <- 0.
- Send out an HTTP GET to a registrar to see if "i.(tld)" is taken.
- If it's not taken, notify the user and quit.
- i <- i + 1.
- 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.)
精彩评论