Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

i can't get host name , i use this simple code of vb.net (v2012)
this is google.com ip address, but i get this iad23s23-in-f2.1e100.net i want to get google.com.

i want to create i simple program to find all subdomain name of an weburl with resolve ip range.
(like acunetix web .. scanner)
how i do it?
thanks
XML
<pre lang="vb">
Imports System.Net

Public Class Form1


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        RichTextBox1.AppendText(Dns.GetHostEntry(&quot;74.125.228.194&quot;).HostName.ToString)

    End Sub
End Class</pre>
Posted

1 solution

You can't necessarily get "the host name" for an IP address, for two reasons:
1) It may not have one: the IP address you are using probably doesn't, for example. Each Domain is connected to one IP, but the reverse is not necessarily true.
2) There can be more than one domain associated with a single IP address.

However, if you can do it, you use DNS.GetHostEntry[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900