Jump to content

Archived

This topic is now archived and is closed to further replies.

thewird

Get Nameserver(s) of a domain?

Recommended Posts

How would I find the nameserver(s) of a domain and store them in a variable with PHP4 compatible? Thanks.

thewird

Share this post


Link to post
Share on other sites
I don't know for 100% sure, but I'm about 98% sure you can't get that information via PHP.

Share this post


Link to post
Share on other sites
Why?  What would you possibly want the nameserver for?

Share this post


Link to post
Share on other sites
check for scripts to get the WHOIS
then with that data, see if u can grab the NameServers

Share this post


Link to post
Share on other sites
I'm creating a proxy hosting websites to run on large scale for free. I need to make a function to see if the nameserver matches our nameservers before people add their domains.

thewird

Share this post


Link to post
Share on other sites
You can use cURL and some easily formatted online WHOIS form to get the information, parse it, and store it in pieces.


Try plugging this service:
http://www.whois.net/whois.cgi2?d=someaddr.com

It gives the nameservers.

Share this post


Link to post
Share on other sites
I know of something that may help. I use this for do whois searches but it could be adjusted to suit your needs. Here is a a tutorial on using [url=http://codewalkers.com/tutorials/76/5.html]sockets[/url] to search whois databases.

Now what I would do with the results is search them line by line for anything that contained an NS.

Maybe this will help some.

Good Luck,
Tom

Share this post


Link to post
Share on other sites
[quote author=tomfmason link=topic=105192.msg424462#msg424462 date=1156915155]
I know of something that may help. I use this for do whois searches but it could be adjusted to suit your needs. Here is a a tutorial on using [url=http://codewalkers.com/tutorials/76/5.html]sockets[/url] to search whois databases.

Now what I would do with the results is search them line by line for anything that contained an NS.

Maybe this will help some.

Good Luck,
Tom
[/quote]
How exactly would I do that?

thewird

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.