IP Finder By Website

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts Page 1 of 1
Contributors
GoodGuy17
Coding God
Coding God
Posts: 1610
Joined: Mon Sep 07, 2009 12:25 am

IP Finder By Website
GoodGuy17
Hello,
How can I "tracert" a website to get the IP address?
P.S. It will find the IP of a website.
Textbox1 has the website
label1 will have IP
button1 shows IP
thanks
~GoodGuy17 :D
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: IP Finder By Website
CodenStuff
Hello,

This should get the IP address using the controls you mentioned:

Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim WebsiteURL As Net.IPHostEntry = Net.Dns.GetHostEntry(TextBox1.Text)
        Dim WebsiteIP As Net.IPAddress() = WebsiteURL.AddressList
        Dim IP As Integer = 0
        Do While IP < WebsiteIP.Length
            Label1.Text = WebsiteIP(IP).ToString() : IP += 1 'SHOWS THE IP
        Loop
    End Sub
Hope that helps cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
2 posts Page 1 of 1
Return to “Tutorial Requests”