Winfrom 抓取web页面内容代码

            WebRequest request = WebRequest.Create("http://1.bjapp.sinaapp.com/play.php?a=" + PageUrl);
            WebResponse response = request.GetResponse();
            Stream resStream = response.GetResponseStream();
            StreamReader sr = new StreamReader(resStream, System.Text.Encoding.UTF8);
            string htmlinfo = sr.ReadToEnd();
            resStream.Close();
            sr.Close();

你可能感兴趣的:(Web)