By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,343 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,343 IT Pros & Developers. It's quick & easy.

Domains

P: n/a
I know this is a little off topic but you guys are the best and i know
somebdoy out there will have the answer to my question :

I need to know how to find out all the domain names on the internet or if
thats not possible a method of determining
a domain name from any given ip address.

--
Terry Burns
http://TrainingOn.net
Mar 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Using Visual Studio 2005, put two text boxes and one command button on a
form and use this code. It will handle either a name or a numeric IP
address

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Windows.Forms.Cursor.Current = Cursors.WaitCursor
'first determine if a numeric Ip address or a name
Dim txtSearch As String = "", Result As String = ""
If IsNumeric(Replace(Trim(Me.TextBox1.Text), ".", "")) Then
txtSearch = Trim(Me.TextBox1.Text)
Dim host As System.Net.IPHostEntry
Try
host = System.Net.Dns.GetHostEntry(txtSearch)
Result = host.HostName.ToString
Catch ex As Exception
Windows.Forms.Cursor.Current = Cursors.Default
MsgBox(ex.Message)
End Try
Else 'need to change the host name into a numeric IP address
Dim host As System.Net.IPHostEntry
Try
host = System.Net.Dns.GetHostEntry(Trim(Me.TextBox1.Text) )
Catch ex As Exception
Windows.Forms.Cursor.Current = Cursors.Default
MsgBox(ex.Message)
Exit Sub
End Try

Result = host.AddressList(0).ToString
End If
Me.TextBox2.Text = Result
Windows.Forms.Cursor.Current = Cursors.Default
End Sub
"Terry Burns" <me@mine.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I know this is a little off topic but you guys are the best and i know
somebdoy out there will have the answer to my question :

I need to know how to find out all the domain names on the internet or if
thats not possible a method of determining
a domain name from any given ip address.

--
Terry Burns
http://TrainingOn.net

Mar 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.