Support Forums
[C#] Get External IP. - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [C#] Get External IP. (/showthread.php?tid=11242)



[C#] Get External IP. - wchar_t - 08-13-2010

Code:
public static string getIP()
        {
            try
            {
                WebClient client = new WebClient();
                return client.DownloadString("http://whatismyip.com/automation/n09230945.asp");
            }
            catch (Exception) { return null; }
        }

grabbed from vBot

i think it was the first to use this.


RE: [C#] Get External IP. - -BoodyE- - 08-14-2010

Nice source Blair.


RE: [C#] Get External IP. - XACTLYSIN - 08-14-2010

Nice source, bro keep it up. i like these tutorials!


RE: [C#] Get External IP. - wchar_t - 08-14-2010

(08-14-2010, 01:45 PM)XACTLYSIN Wrote: Nice source, bro keep it up. i like these tutorials!

not really a tut.

more of a nice snippet.

Big Grin