通过HttpWebResponse和HttpWebRequest 获取http地址上的图片
Posted on 2007-06-28 02:23 且行且思 阅读(3318) 评论(0) 编辑 收藏 举报HttpWebResponse resp;
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://www.csdn.net/Images/logo_csdn.gif");
req.Timeout = 150000;
resp = (HttpWebResponse)req.GetResponse();
System.Drawing.Image img;
img = new System.Drawing.Bitmap(resp.GetResponseStream());
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create("http://www.csdn.net/Images/logo_csdn.gif");
req.Timeout = 150000;
resp = (HttpWebResponse)req.GetResponse();
System.Drawing.Image img;
img = new System.Drawing.Bitmap(resp.GetResponseStream());