34.200.222.93
Y o u r    I P     i s
34.200.222.93
[ 현재: 1597194210 ] : Timestamp Convert

C# Real IP Check Function

public static IPAddress GetExternalIp() { string ip = string.Empty; try { string sourceURL = string.Empty; sourceURL = string.Format("https://api.tion.kr"); WebClient client = new WebClient(); client.Encoding = Encoding.UTF8; string data = client.DownloadString(string.Format("https://api.tion.kr")); string pattern = "(<myip>)(?<ip>[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}?)(</myip>)"; MatchCollection matches = Regex.Matches(data, pattern); foreach (Match match in matches) { if (match.Groups["ip"].Length > 0) { MessageBox.Show(match.Groups["ip"].Value); } } } catch (Exception) { } IPAddress externalIp = IPAddress.Parse(ip); return externalIp; }