Y o u r    I P     i s
54.162.239.233
[ 현재: 1537281142 ] : Timestamp Convert

C# Real IP Check Function

public static IPAddress GetExternalIp() { string whatIsMyIp = "http://api.tion.kr"; string getIpRegex = @"(?<=<title>.*)\d*\.\d*\.\d*\.\d*(?=</title>)"; WebClient wc = new WebClient(); UTF8Encoding utf8 = new UTF8Encoding(); string requestHtml = ""; try { requestHtml = utf8.GetString(wc.DownloadData(whatIsMyIp)); } catch (WebException we) { // do something with exception Console.Write(we.ToString()); } Regex r = new Regex(getIpRegex); Match m = r.Match(requestHtml); IPAddress externalIp = null; if (m.Success) { externalIp = IPAddress.Parse(m.Value); } return externalIp; }