Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Display users IP Address[BASIC] filter_list
Author
Message
Display users IP Address[BASIC] #1
Well first you want to create a form with one button, and one label.

Design it how ever you want. Go in to the Code View and at the top of your code place import System.Net

Next, go back to design view and double click the button.

Place this code.

Code:
'Declare the webclient for downloading the string
        Dim theClient As New WebClient
        'Declare the string
        Dim visitorIP As String
        'Set the string as the result of the Web Client downloading the page(my website)
        visitorIP = theClient.DownloadString("http://whatsmydetails.net/raw.php")
        'Set the text of the label to the string
        Label1.Text = "Your IP is: " & visitorIP

Start your program click the button and it should look like this:
[Image: tqhWadp.png]
[Image: GiXvY27.png]

Reply

RE: Display users IP Address[BASIC] #2
Only works if the user is connected to the internet though.

Reply

RE: Display users IP Address[BASIC] #3
Seems obvious. Internet features are not available if you are not connected to the internet.

Reply

RE: Display users IP Address[BASIC] #4
Thank you for taking your time to write this! Great work Smile

Reply







Users browsing this thread: 1 Guest(s)