Link to home
Start Free TrialLog in
Avatar of chadmanvb
chadmanvb

asked on

get image and byte size from internet in visual basic .net

We have a static image on our website and we use that to check if the site is up.  How could I get the image and byte size using visual basic .net with a url?
ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chadmanvb
chadmanvb

ASKER

Ohh, looks like that works.....one quick question.  How can I have it write over the image if it already exist in my local dir?
Worked great.  Just used an overload so I could keep overwriting the file.

My.Computer.Network.DownloadFile _
    (address := "http://www.randomurl.com/randomfile.txt", _
    destinationFileName := Path.Combine(Environment.GetFolderPath( _
    Environment.SpecialFolder.ApplicationData), _
    "test/randomfile.txt"), _
    userName := string.Empty, password := string.Empty, _
    showUI := False, connectionTimeout := 100000, _
    overwrite := True)