Whether you need to trade-up to a shiny new Firebox or just ready to upgrade from whatever appliance you're using now, WatchGuard has the right appliance for you! Find your perfect Firebox today with appliance sizing tool!
Option Compare Database Function Download_File(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte 'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP") oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website oXMLHTTP.Send 'send request '****** This is where I get the log in; 'Wait for request to finish Do While oXMLHTTP.readyState <> 4 DoEvents Loop oResp = oXMLHTTP.responseBody 'Returns the results as a byte array 'Create local file and save results to it vFF = FreeFile If Dir(vLocalFile) <> "" Then Kill vLocalFile Open vLocalFile For Binary As #vFF Put #vFF, , oResp Close #vFF 'Clear memory Set oXMLHTTP = Nothing End Function Sub downloadSetup(dl_link As String, savefile As String) 'Download tiny web server to the %TEMP% directory, use local copy of winzip to unzip 'Obviously in a real world application you'd want to bring your own unzipper Download_File dl_link, savefile 'Run_Program "winzip", "-e -o %TEMP%\tinyweb.zip %TEMP%", INVISIBLE, Wait End Sub Sub download_data(dl_folder As String, format_val As String, dl_date As Date) Dim latest_date As Date Dim file_date As String, link As String latest_date = dl_date If (Right(dl_folder, 1) <> "\") Then dl_folder = dl_folder & "\" End If file_date = Format(Year(latest_date), "0000") & Format(Month(latest_date), "00") & Format(Day(latest_date), "00") link = "https://filedownloadlink.com/files/classification" & "/415?date=" & file_date & "&format=" & format_val Call downloadSetup(link, dl_folder & product_grp & file_date & ".txt") End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.