日期:2014-05-20 浏览次数:20715 次
private string GetContentFromUrll(string _requestUrl) { string _StrResponse =""; HttpWebRequest _WebRequest = ( HttpWebRequest )WebRequest.Create( _requestUrl ); _WebRequest.Method = "GET"; WebResponse _WebResponse = _WebRequest.GetResponse(); StreamReader _ResponseStream = new StreamReader( _WebResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("gb2312")); _StrResponse = _ResponseStream.ReadToEnd(); _WebResponse.Close(); _ResponseStream.Close(); return _StrResponse; }