------------- External IP ------------- Try Dim WC As New System.Net.WebClient MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://www.swlink.net/~styma/REMOTE_ADDR.shtml"))) MsgBox(System.Text.Encoding.ASCII.GetString(WC.DownloadData("http://whatismyip.com/automation/n09230945.asp"))) WC.Dispose() Catch 'Display Error Message End Try ------------- Internal IP ------------- Try Dim ipEntry As System.Net.IPHostEntry = Net.Dns.GetHostEntry(Environment.MachineName) Dim IpAddr As System.Net.IPAddress() = ipEntry.AddressList MsgBox(IpAddr(0).ToString()) Catch 'Display Error Message End Try --------------- Address to IP --------------- If Not T2.Text = "" Then Try ipE = Dns.GetHostEntry(T2.Text) Catch MessageBoxEx.Show("Site does not exist!", "DoS", MessageBoxButtons.OK, MessageBoxIcon.Information) End Try Dim IpA() As IPAddress = ipE.AddressList TX.Text = IpA(0).ToString End If
Edited by iBotPeaches, 09 September 2009 - 05:42 AM.