// requestUrl:地址?xx=xx 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("UTF-8")); _StrResponse = _ResponseStream.ReadToEnd(); _WebResponse.Close(); _ResponseStream.Close(); return _StrResponse; }