using System.Net;
using System.IO;

string url = "http://www.google.com";
WebRequest request = WebRequest.Create(url);
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream, System.Text.Encoding.Default);
Response.Write(reader.ReadToEnd());
reader.Close();
dataStream.Close();
posted on 2006-10-31 09:40  有些伤感  阅读(356)  评论(0编辑  收藏  举报