Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

IP Display VB.NET

How do you display someone's IP in VB.NET?

Like;

Your IP is:
[ IP HERE ]
(Mar 22, 2014 02:41 PM)airplanejoe Wrote:  How do you display someone's IP in VB.NET?

Like;

Your IP is:
[ IP HERE ]

Using web As New WebClient()
Dim ip As String = web.DownloadString("http://rstown.x10.mx/chat/getip.php")
Label1.text = ip
End Using
There are plenty of sites that dump the IP as text:

http://cfaj.freeshell.org/ipaddr.cgi

You could just do webclient.DownloadString()

EDIT: Geraldososa beat me to it. :(
Thanks guys! I needed it for a VPN program I am making - seems stupid but it really isn't. Thanks very much!


Uh, somehow it isn't working, It says "Type 'webclient' is not defined".

Could you help me out, please? I'm using Visual Basic 2008 Express Edition
(Mar 22, 2014 03:09 PM)airplanejoe Wrote:  Thanks guys! I needed it for a VPN program I am making - seems stupid but it really isn't. Thanks very much!


Uh, somehow it isn't working, It says "Type 'webclient' is not defined".

Could you help me out, please? I'm using Visual Basic 2008 Express Edition

Have you used my snipped or the one the other person posted? Because you would need to define the webclient.

http://msdn.microsoft.com/en-us/library/....110).aspx
(Mar 22, 2014 03:09 PM)airplanejoe Wrote:  Thanks guys! I needed it for a VPN program I am making - seems stupid but it really isn't. Thanks very much!


Uh, somehow it isn't working, It says "Type 'webclient' is not defined".

Could you help me out, please? I'm using Visual Basic 2008 Express Edition
Imports System.Net
Please don't make a vpn program if you don't know how to use a webclient.
This little snippet will store the users IP address inside the variable "ip".
[Image: 6PLJGXv.png]

Hope I helped!
Do you want it of the local computer?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by Tɦɛ AlexDec 22, 2015 12:46 PM 2 336 Dec 22, 2015 12:46 PM
Last Post: Tɦɛ Alex
[.NET] by MithreilNov 14, 2013 11:53 AM 2 95 Nov 14, 2013 11:53 AM
Last Post: Mithreil
[.NET] by StokerbanditDec 24, 2011 05:32 AM 0 153 Dec 24, 2011 05:32 AM
Last Post: Stokerbandit