thewird Posted August 22, 2006 Share Posted August 22, 2006 How would I find the nameserver(s) of a domain and store them in a variable with PHP4 compatible? Thanks.thewird Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/ Share on other sites More sharing options...
ober Posted August 22, 2006 Share Posted August 22, 2006 I don't know for 100% sure, but I'm about 98% sure you can't get that information via PHP. Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78650 Share on other sites More sharing options...
thewird Posted August 22, 2006 Author Share Posted August 22, 2006 There must be some way of getting the data though?thewird Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78670 Share on other sites More sharing options...
ober Posted August 22, 2006 Share Posted August 22, 2006 Why? What would you possibly want the nameserver for? Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78672 Share on other sites More sharing options...
onlyican Posted August 22, 2006 Share Posted August 22, 2006 check for scripts to get the WHOISthen with that data, see if u can grab the NameServers Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78674 Share on other sites More sharing options...
thewird Posted August 22, 2006 Author Share Posted August 22, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78706 Share on other sites More sharing options...
mewhocorrupts Posted August 23, 2006 Share Posted August 23, 2006 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.comIt gives the nameservers. Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-78919 Share on other sites More sharing options...
thewird Posted August 30, 2006 Author Share Posted August 30, 2006 Anyone got any code?thewird Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-82612 Share on other sites More sharing options...
tomfmason Posted August 30, 2006 Share Posted August 30, 2006 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 Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-82620 Share on other sites More sharing options...
thewird Posted August 31, 2006 Author Share Posted August 31, 2006 [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 Quote Link to comment https://forums.phpfreaks.com/topic/18305-get-nameservers-of-a-domain/#findComment-83662 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.