随笔分类 -  asp.net

摘要:在很多网站登陆的时候,都要求有登陆日志,以便于后面做报表分析。如没地区的访问量等等。 下面是一段调用www.ip138.com网站的一个获取登陆用户的外网IP地址。Code 1 public string GetIP() 2 { 3 string str = null; 4 string url = "http://www.ip138.com/ip2city.asp"; 5 6 WebClient wc = new WebClient(); 7 8 wc.Credentials = CredentialCache.DefaultCredentials; 9 10 Byte[ 阅读全文
posted @ 2012-05-11 16:05 孤独的小狼 阅读(519) 评论(0) 推荐(1)