Quote:
Originally Posted by tristolas
no programming language has the ability to go to a specified url & save it to computer?
The URLs are the URLs of the images; not of the pages that contain the images... is a web crawler necessary for this?
|
All you need is the URL. You can use the
System.Net.WebClient.DownloadData() method to fill a byte array with the file contents. You can then do whatever with this, including saving it to disk, manipulating the data, or whatever you want to do. If you need to do this without blocking on the current thread, you can use the
DownloadDataAsync() method instead (don't call the blocking version in multiple threads simultaneously; it will throw an exception). Both links describe the methods; the first one also has code examples. I don't feel like typing a lengthy explanation of asynchronous I/O right now, but if you're familiar with callback functions (or whatever VB calls 'em), then it's pretty easy to use non-blocking I/O (though you really don't need it for this, especially if all the files are fetched from the same server).