发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
private string GetUrlHTML(string url)
{
string GetContext;
GetContext="";
HttpWebRequest GetWebRequest;
HttpWebResponse GetWebResponse;
GetWebRequest=(HttpWebRequest)System.Net.WebRequest.Create(url);
GetWebResponse = (HttpWebResponse)GetWebRequest.GetResponse();
if(GetWebResponse.StatusCode == HttpStatusCode.OK)
{
Stream GetStream = GetWebResponse.GetResponseStream();
StreamReader GetStreamReader;
GetStreamReader = new StreamReader(GetStream,System.Text.Encoding.GetEncoding("GB2312"));
GetContext = GetStreamReader.ReadToEnd();
GetStreamReader.Close();
}
return GetContext;
}
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。