How to get domain name from IP address
Hi,
I have heard from my friends that we can convert an Ip address to an domain name I am very much keen to do that, i have try to find it over internet and i got some of the components where i can do it but is there can coding which i can use it,then it would be great for me.
Re: How to get domain name from IP address
Sure i will provide you the code for that you need to use the following code:-
Code:
HostName = System.Net.Dns.GetHostName();
IPAddres = System.Net.Dns.GetHostAddresses(HostName).GetValue(0).ToString();
Re: How to get domain name from IP address
You can also try this code too
Code:
Set DomainName = objRootDSE.OpenDSObject("WinNT://TESTDOM", "abc", "xyz", ADS_SECURE_AUTHENTICATION)
DomainName.Filter = Array("User")
For Each usrName In DomainName
MsgBox usrName.Name
Next
Re: How to get domain name from IP address
Thanks for replying me can anyone provide me code get domain name from IP address which is in Vb.Net then i would be very greatfull to him.
Re: How to get domain name from IP address
At last i have got a code in Vb.Net here goes the code
Code:
Dim myHost As String = System.Net.Dns.GetHostName
Dim myIPs As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(myHost)
Response.Write("Host Name = " & myIPs.HostName & "<br />")
For Each myIP As System.Net.IPAddress In myIPs.AddressList
Response.Write("The IP address of host is = " & myIP.ToString)
Next
Re: How to get domain name from IP address
hi
you can simply get the domain name from ip at whoisxy, Here you give only the domain name it provide necessary detail for you