Jump to content


Photo

Get Nameserver(s) of a domain?


  • Please log in to reply
9 replies to this topic

#1 thewird

thewird
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 22 August 2006 - 03:02 PM

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

thewird

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 22 August 2006 - 04:51 PM

I don't know for 100% sure, but I'm about 98% sure you can't get that information via PHP.

Info: PHP Manual


#3 thewird

thewird
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 22 August 2006 - 05:16 PM

There must be some way of getting the data though?

thewird

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 22 August 2006 - 05:19 PM

Why?  What would you possibly want the nameserver for?

Info: PHP Manual


#5 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 22 August 2006 - 05:28 PM

check for scripts to get the WHOIS
then with that data, see if u can grab the NameServers

Tell me the problem, I will try tell you the solution

#6 thewird

thewird
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 22 August 2006 - 06:20 PM

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

#7 mewhocorrupts

mewhocorrupts
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts
  • LocationParker, CO

Posted 23 August 2006 - 12:01 AM

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...?d=someaddr.com

It gives the nameservers.

-mewhocorrupts

#8 thewird

thewird
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 30 August 2006 - 04:52 AM

Anyone got any code?

thewird

#9 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 30 August 2006 - 05:19 AM

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 sockets 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

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#10 thewird

thewird
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 31 August 2006 - 07:50 PM

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 sockets 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

How exactly would I do that?

thewird




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users