string tempip = "";
try
{
HttpWebRequest wr = (HttpWebRequest)System.Net.WebRequest.Create("http://iframe.ip138.com/ic.asp");
Stream s = wr.GetResponse().GetResponseStream();
StreamReader sr = new StreamReader(s, Encoding.Default);
string all = sr.ReadToEnd();
int start = all.IndexOf("[") + 1;
int end = all.IndexOf("]", start);
tempip = all.Substring(start, end - start);
sr.Close();
s.Close();
}
catch
{
}
return tempip;