Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Sedo

Getting contact info from a domain (via a script)

Status
Not open for further replies.

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
EDIT: Thanks for the info all :) I've coded up a web-based tool for this now.

Hi all,
For a project I'm working on, I'm looking to get the contact info from a domain (i.e. a WHOIS scan). Obviously it'd not be used for any spammy purposes (it'll be limited to one check at a time, with flood protection, and the e-mail address will be output as an image)

I know that to get the general info about a domain you connect to the relevant WHOIS server via port 43, and then send the request with the domain, a carriage return and a new line and the details like registrar, expiration/creation date (etc) gets returned.

But am I right in thinking that the only way to get the actual contact info is by querying the registrar's WHOIS servers? If so, what's the best way to do this? Since there's thousands of registrars, and I can't see any of them have any sort of API to run the WHOIS request through.

Thanks for any info you can provide :) This will be for a custom script, I'm writing it myself (it'll be for a website project I'm working on), hence why I don't want to just use another, already created WHOIS website.

Thanks,
Tristan
 
Last edited:
Dynadot - Expired Domain Auctions

katherine

Country hopper
Legacy Exclusive Member
Joined
Jul 9, 2005
Messages
8,427
Reaction score
1,290
For .com/.net you need to query the registrar. The registry info provides a pointer to the sponsoring registrar and the whois server to query.
 

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
For .com/.net you need to query the registrar. The registry info provides a pointer to the sponsoring registrar and the whois server to query.
You are quite right, thanks :) It seems that (out of the list of TLDs I'm allowing for the script to scan), only .com, .net and .name doesn't return the contact info (and I'm not too concerned about .name right now :tongue1:). Thought all of them only provided limited info and you had to query the registrar in each case. "You learn something new every day" ^^

Just to quickly check - for .com and .net it'll come back with something like:

"Whois Server: whois.moniker.com Referral URL: http://www.moniker.com/whois.html"

Would that mean that I should then connect to whois.moniker.com on port 43, submit a HTTP referral header, and then query the domain as before? :)
 

katherine

Country hopper
Legacy Exclusive Member
Joined
Jul 9, 2005
Messages
8,427
Reaction score
1,290
Just use the whois server.
The referral URL usually points to the registrar's home page.
Now you can use the web interface of Moniker or any other registrar to query whois on a domain but there are limitations normally.
 

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
Just use the whois server.
The referral URL usually points to the registrar's home page.
Now you can use the web interface of Moniker or any other registrar to query whois on a domain but there are limitations normally.
Okay I will do, thanks a lot for the help :)
 

ecomindia

e-commerce.in
Legacy Exclusive Member
Joined
Nov 17, 2003
Messages
1,380
Reaction score
25
IS there any script like several domain tools script that checks huge list of domains for whois details for TLDs

PHP/ASP/CGI script will do ..
 

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
IS there any script like several domain tools script that checks huge list of domains for whois details for TLDs

PHP/ASP/CGI script will do ..
There's Domain Research Tool. Not many other bulk checkers out there, but DRT is decent (but expensive considering that it is quite buggy)
 

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
Thanks Tristan . But looking for web based bulk checking script , if any ..
no application / stand-alone tool.
Oh I see, sorry :) Yeah, am not too sure if any exist at the moment. GoDaddy allow you to check 500 at a time, but you must do this manually. Good for small lists though.
 

JoshuaPz

Exclusive Lifetime Member
Legacy Exclusive Member
Joined
Aug 29, 2008
Messages
29
Reaction score
0
The following TLDs use "thin" whois (contact info is stored with the registrar):
* .com
* .net
* .tv
* .cc
For these TLDs, you'll need to query the whois service of the actual registrar (GoDaddy, eNom, etc.) to obtain contact info. If you're a perl guy like I am, you could use a module like Net::Whois::Raw to extract raw whois, then parse out contact information. The latter step is a pretty challenging as the whois format changes significantly from one registrar to the next, which is why you can't find any publicly available tools (AFAIK) which do such parsing. I have, however, successfully managed to write a fairly universal whois contact info parser which works with all major registrars and I use it to generate the sales leads data offered by the service specified in my sig. I haven't written a web interface for bulk scanning names though because I'd need more resources (e.g. numerous IP addresses, for load-balancing requests propely) than I have available to allow public access to such a tool.

Nearly all gTLDs other than above (.org, .info, etc.) as well as ccTLDs use "thick" whois -- that is, the contact information is stored centrally. You can obtain the information by connecting to [tld].whois-services.net (where [tld] is "org", "info", etc.) on TCP port 43 and sending the text string "domain [domain]" (where [domain] is the domain you'd like contact info for of course) followed by a Unix newline. The returned data is always in the same form no matter that the TLD and is hence extremely easy to parse. PM me and I'll send you a 60-line perl snippit which parses out thick whois contact info.

Good luck!
 
Last edited:

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
Hi Josh,
Hmm yeah, thanks for the information :) I'll PM you now to see how you've gone about extracting the info from the 'thick' WHOIS data, seems like it could be a useful script thanks.
 

vistaxie

Level 3
Legacy Platinum Member
Joined
Feb 11, 2009
Messages
64
Reaction score
0
you should get one domain query api for doing that,instead of grab web pages from moniker or other registar else.cos there is always a query limit for each registar,i think

best wishes
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 2) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

MariaBuy

Upcoming events

New Threads

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom