Support Forums

Full Version: How to make an IP finder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How to make an IP Finder

Open VB
Press File>New Project and press OK.


Now make:
  • 2 Labels
  • 2 TextBoxes
  • 1 Button

Label1 text: "Website:"
Label2 text: "IP:"
Button text: "Get IP"

Put the first TextBox next to "Website:" and at (Name) put "TextSite"
Put the second TextBox next to "IP:" and at (Name) put "TextIp"

Go to the code and delete everything.

Then copy and paste this code:


Code:
Imports System.Net

    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            If TextSite.Text.Contains("http://") Then
                Dim iphe As IPHostEntry = Dns.GetHostEntry(TextSite.Text.Replace("http://", String.Empty))
                TextIp.Text = iphe.AddressList(0).ToString()
            Else
                Dim iphe As IPHostEntry = Dns.GetHostEntry(TextSite.Text)
                TextIp.Text = iphe.AddressList(0).ToString()
            End If
        Catch ex As Exception
            MsgBox(ex)
        End Try
    End Sub
End Class
Wow, you're on a roll with posting useful stuff today, aren't you. Big Grin
(04-06-2010, 01:21 AM)h4ckingURLife Wrote: [ -> ]Wow, you're on a roll with posting useful stuff today, aren't you. Big Grin

Yes Thumbsup
Thanks For Sharing SmileBig Grin
Thanks for the share Big Grin
No problem! Glad you like it Smile
This doesn't teach anyone anything.. sorry.
You should explain line by line what everything does, or at least comment the code.
Telling people to literally copy/paste the code is just promoting leechers.
It'd be better if you promoted the learning of actual coding.. not just script kiddie techniques (that is, copying/pasting source). I'm not saying that I don't appreciate your contribution.. I just think it'd be a lot better if you would explain to us line by line what you are doing.
Thanks dude!, I am sure this will come in handy 1 way or another Smile, Thanks again for the share.
Simple but usefull Big Grin
Thanks
Thanks for sharing!

I might use this in my next application.
Pages: 1 2