Download file from internet

mcerk

Well-known member
Joined
Nov 1, 2004
Messages
78
Hi.
Id like to download file from internet. Id like to download specific picture.

I have a lot of problems, becouse file doesnt get downloaded each time.
Im using this procedure and in 5 of 10 shots it fails.
please help
Code:
   download image
        Try
            My.Computer.Network.DownloadFile(urlPath, myFile, "", "", False, 10000000, True)
            sql.Insert_Log(clsSQLfunctions.ErrorTypes.Importance4, 1, "Downloaded: ", urlPath)
            Img = Image.FromFile(myFile)
                       DownloadImage = True
        Catch ex As Exception
            DownloadImage = False
            sql.Insert_Log(clsSQLfunctions.ErrorTypes.Importance1, 1, "Error: Cant download (or rewrite) file", "DownloadImage #2 " & urlPath & " " & myFile)
        End Try
 

Similar threads

C
Replies
0
Views
74
CSharp Enthusiast
C
W
Replies
0
Views
92
want 2 Learn
W
W
Replies
0
Views
81
want 2 Learn
W
Back
Top