VB and VBA Users Source Code: Re: Entering a password for an FTP/HTTP site using the URL
[
Home
|
Contents
|
Search
|
Reply
|
Previous
| Next ]
VB/VBA Source Code
Re: Entering a password for an FTP/HTTP site using the URL
By:
Collin Davis
Email (spam proof):
Email the originator of this post
Date:
Wednesday, December 21, 2005
Hits:
5202
Category:
Internet/Remote Comms
Article:
I am trying to write a program that will log meinto a web site for which I am a member, and then down load a file(s) usign the URLDownloadToFile library function instead of copying/pasting one at a time. Private Declare 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 Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function Private Sub cmdGetFiles_Click() 'example by Matthew Gates (Puff0rz@hotmail.com) 'http://username:password@www.vbusers.com DownloadFile "https://25354293:002373@URL, "C:\Temp Files\22006.txt" End Sub The URL for the file is a sub url of the member login page: Main Page: http://www.vbusers.com Login Page: http://www2.vbusers.com/weborder/welcome_lookup.asp Page With file Links: https://www2.vbusers.com/weborder/Assets/22006.txt" Any suggetions as to how I cna login and than download the file? Thanks!
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder