摘要: //可绕过代理直接取得机器的真实ip,超级匿名代理除外public static string IPAddress { get { string result = String.Empty; result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if(result!=null&&r...
阅读全文
摘要: 在msdn上找到的,贴出来记录一下。HttpBrowserCapabilities bc = Request.Browser;Response.Write("<p>Browser Capabilities:</p>");Response.Write("Type = " + bc.Type + "<br>");Response.Write("Name = " + ...
阅读全文
摘要: 增加命名空间:using System.Net; using System.IO; /// <summary>/// 下载文件/// </summary>/// <param name="URL">要下载文件网址</param>public void downloadfile(string URL){WebClient client=new WebC...
阅读全文