On Sat, 1 Apr 2006 13:47:07 +0200, "Peter Eriksson"
<pe****************@telia.com> wrote:
I have made an application that downloads images from a website with
code like this:
Dim Client As WebClient = New WebClient()
imageUrl = http://www.websíte.com/image.jpg
Client.DownloadFile(imageUrl, dest)
This works fine but the website returns a defaultimage if the image is
adressed with a complete url. You have to first wisit the mainpage and
then you can adress the image.
How can I achive this?
On the mainpage, right-click the image, properties, and see what the
actual URL is to the image. That URL should retrive the correct image
if the image is static, or, it's an image that is updated periodically
but has an static file name of something like .. /latest.jpg. If it's
an updating image and has an ultimate filename that is based on
something like date/time, you will have to predetermine the current
URL (i.e. a parseHTML routine of some sort)
If VB2005 and you just want to write to disk, you can also use this
with it's various arguments:
My.Computer.Network.DownloadFile(someURL, someDest)
Gene