日期:2014-05-18 浏览次数:20807 次
#region##获取HTML源码信息 ///<summary> /// 获取HTML源码信息(Porschev) ///</summary> ///<param name="url">获取地址</param> ///<returns>HTML源码</returns> public string GetHtml(string url) { Uri uri = new Uri(url); WebRequest wr = WebRequest.Create(uri); Stream s = wr.GetResponse().GetResponseStream(); StreamReader sr = new StreamReader(s, Encoding.Default); return sr.ReadToEnd(); } #endregion