We first rely on the DNS, which is the safest method. We query the SRV records (see RFC 2782 ) "nicname", as described in The Internet-Draft "Using DNS SRV records to locate whois servers".
Then, we ask the IANA database which lists some whois servers.
Then we try whois.nic.$TLD.
We always query ARIN first, since it seems to be the only RIR which includes proper redirections.
Just request
http://www.generic-nic.net/dyn/whois/ask-text?query=YOURDOMAIN. This
would yield a reply of type text/plain, suitable for tools like wget,
for instance.
You have three ways to format the text output of a whois server.
It is the solution we currently use.
Pros:
Cons:
I tried this approach with Perl's TextTOHTML module.
Pros:
Cons:
A former whois service at AFNIC worked that way.
Pros:
Cons:
This service was developed with the Perl programming language, the Mason templating system.
The interaction with the whois servers is performed by a custom Perl package (available on demand).
Warning: results sent by this service comes directly from foreign whois servers that we do not control. That's why they can be in many languages, for instance.
(French) Attention : les résultats affichés par ce service viennent directement de serveurs whois étrangers que nous ne contrôlons pas. C'est pourquoi ils peuvent être dans des langues différentes.
.fr registry.
Contact Generic NIC team for every question.