dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Get DNS server being queried

Hybrid View

  1. #1
    Join Date
    May 2003
    Posts
    599

    Get DNS server being queried

    I am using gethostbyname() to retreive the ip of a specific host...but what I want to do is display the nameserver being used to get the ip.

    The only way I can think to do this is by doing "nslookup" at the shell and parse the server string. Isn't there a native PHP function that can get the DNS server being queried?

  2. #2
    Join Date
    Apr 2012
    Posts
    38

  3. #3
    Join Date
    May 2003
    Posts
    599
    Thanks, that is a good option. The only problem is that this function only returns "authoritative" nameservers. In my case, I am querying an internal Windows DNS server to get internal computer names / ip addresses, which does not advertise itself as authoritative so it wont show up in the response.

  4. #4
    Join Date
    Apr 2012
    Posts
    38
    I don't think there is a possibility to do this on local networks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles