1,979
社区成员
发帖
与我相关
我的任务
分享
有详细点的吗?
public Stream GetStream()
{
HttpWebResponse httpWebResponse = null;
HttpWebRequest httpWebRequest;
httpWebRequest.Method = Method;
httpWebRequest.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
httpWebRequest.Headers["Accept-Charset"] = "GBK,utf-8;q=0.7,*;q=0.3";
httpWebRequest.Headers["Accept-Language"] = "zh-CN,zh;q=0.8";
httpWebRequest.Headers["Cache-Control"] = "max-age=0";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.CookieContainer = cookie;
httpWebRequest.Referer = Url;
httpWebRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5";
httpWebRequest.Proxy = null;
httpWebRequest.AllowAutoRedirect = true;
httpWebRequest.Timeout = 10000;
httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
return httpWebResponse.GetResponseStream();
}
this.pictureBox1.Image = GetStream();