by Joe Healey (1 Submission)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
Download any file off the internet. With this 2 line code snippet. This can download HTML File all the way to zip files. Easy And Quick
Assumes
Easy to use, just one declaration and one call function
API DeclarationsDeclare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
call URLDownloadToFile(0 ,"http://www.download.com/file.zip" ,"C:\downloads\file.zip",0,0)
'Just replace http://www.download.com/file.zip with whatever file you want to DL
'Just Replace C:\downloads\file.zip with where and What File Name you want to save to