Copy an image from internet:
private void CopyFile(string file)
{
WebRequest req = WebRequest.Create(@"http:....." + file);
req.Proxy = new WebProxy("1.1.1.1", 8080);
req.Proxy.Credentials = new NetworkCredential(@"user", "pass");
WebResponse responsePic = req.GetResponse();
Image webImage = Image.FromStream(responsePic.GetResponseStream()); // Error
webImage.Save(@"D:\\pictures\" + file);
}
Monday, May 28, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment