Domains

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terry Burns

    #1

    Domains

    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



  • William LaMartin

    #2
    Re: Domains

    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(B yVal sender As System.Object, ByVal e As
    System.EventArg s) Handles Button1.Click
    Windows.Forms.C ursor.Current = Cursors.WaitCur sor
    'first determine if a numeric Ip address or a name
    Dim txtSearch As String = "", Result As String = ""
    If IsNumeric(Repla ce(Trim(Me.Text Box1.Text), ".", "")) Then
    txtSearch = Trim(Me.TextBox 1.Text)
    Dim host As System.Net.IPHo stEntry
    Try
    host = System.Net.Dns. GetHostEntry(tx tSearch)
    Result = host.HostName.T oString
    Catch ex As Exception
    Windows.Forms.C ursor.Current = Cursors.Default
    MsgBox(ex.Messa ge)
    End Try
    Else 'need to change the host name into a numeric IP address
    Dim host As System.Net.IPHo stEntry
    Try
    host = System.Net.Dns. GetHostEntry(Tr im(Me.TextBox1. Text))
    Catch ex As Exception
    Windows.Forms.C ursor.Current = Cursors.Default
    MsgBox(ex.Messa ge)
    Exit Sub
    End Try

    Result = host.AddressLis t(0).ToString
    End If
    Me.TextBox2.Tex t = Result
    Windows.Forms.C ursor.Current = Cursors.Default
    End Sub


    "Terry Burns" <me@mine.com> wrote in message
    news:%23zit2RNU GHA.6048@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    >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
    >[/color]


    Comment

    Working...