I need a DLL or even just basic Active Server Page code that will do the following:
1. This should invoke the NSLOOKUP utility that is built into Windows Server **2008**.
2. I? have traditionally? called DLLs from Active Server Pages (*.asp) by using the? Set obj = CreateObject("") command.
3. I will pass the remote user's IP address to the object.
4. The object should return to me the value of the reverse lookup record (PTR) if it exists.? If no PTR is found, it should return a value of 0.
Additional functionality requested:
1. The ability to pass a DNS name, such as [login to view URL], and have it return the MX records.
2. The ability to specify the DNS server that is used to calculate the values.? If none is specified, the utility should default to the DNS server specified in the server's primary NIC properties.
If this is not possible using NSLOOKUP, then I will welcome other suggestions.
We do this now using a program called intraDNS.? It is a DLL that we purchased online at? <[login to view URL]>, but it does not appear to work on Windows Server 2008.? You can see an example of it (if your IP address has a PTR) at the bottom of <[login to view URL]>, which still runs on Windows Server 2003.
The code we use to invoke intraDNS follows:
MyIPAddress = [login to view URL]("Remote_Addr")
Set obj = CreateObject("[login to view URL]")
MyDNSServer = "[login to view URL]"
MyDNSServerName = "[login to view URL]"
[login to view URL](MyDNSServer)
MyPTR = [login to view URL]([login to view URL](MyIPAddress) - 1)
Please let me know if any questions...