How do you display someone's IP in VB.NET?
Like;
Your IP is:
[ IP HERE ]
Like;
Your IP is:
[ IP HERE ]
|
.NET
IP Display VB.NET |
(Mar 22, 2014 02:41 PM)airplanejoe Wrote: How do you display someone's IP in VB.NET? 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. :(
Mar 22, 2014 03:09 PM
(This post was last modified: Mar 22, 2014 03:10 PM by airplanejoe.)
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! 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:30 PM
(This post was last modified: Mar 22, 2014 03:30 PM by geraldososa.)
(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!Imports System.Net Please don't make a vpn program if you don't know how to use a webclient. |
|
|
| 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 |