With this example I only want an IP address so it’s rather clean and easy but you can essentially put any public webpage in place of “http://kittell.net/onlyip.php”
System.Net.WebClient wc = new System.Net.WebClient(); byte[] raw = wc.DownloadData("http://kittell.net/onlyip.php"); string webData = System.Text.Encoding.UTF8.GetString(raw); Response.Write(webData);
Last Updated on October 26, 2015