2

Let's say I have Java or C or C++ or foo language on a computer with a connection to the world wide web and I want to programmatically check if a domain foo.com, or bar.net has been registered, how could I do it without relying on an outside service?

I'm looking for the principle here, code to make a connection is not needed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Cody Smith
  • 2,732
  • 3
  • 31
  • 43
  • 3
    I hope you don't consider the DNS and WHOIS to be "outside services", otherwise your task cannot be solved ;-) – DarkDust Dec 09 '13 at 08:15

2 Answers2

1

Your best bet is to ask WHOIS. AFAIK a DNS lookup might not always return a result even though the domain might still be registered.

DarkDust
  • 90,870
  • 19
  • 190
  • 224
1

If you need all information, you'll need to implement the whois protocol. I found this wiki for a list of whois servers (dutch wiki, might be less informative than the english)

smeaggie
  • 197
  • 9
  • 1
    That wiki page only lists very few servers. For more complete lists, see the [NirSoft WHOIS list](http://www.nirsoft.net/whois_servers_list.html) or [this SO answer](http://stackoverflow.com/a/18507856/400056). – DarkDust Dec 09 '13 at 08:24