PDA

Click to See Complete Forum and Search --> : Inet contol and password submit


barostef
Jan 7th, 2001, 05:54 AM
I would like to automatically download web pages that are accessible after doing a login submit. How can I do this?

Bentren
Mar 1st, 2001, 05:29 PM
Here is a good one i tried many this works the best
you may need to modify the code i put this code here so i can get it again when i lost this code on my hard drive one day, it works great.
even can download picture if you provide the right url.
enjoy
i found this code in Feb 20, 2001 sorry you wanted thsi long i been searching for this code for moths,
i modified it so you dont get a dialog box you by pass that dialog box that every body hates when downloading a web page. so i removed it .


Dim RealFile$
Dim myFile$
'declarations

' call the download url
Call GetInternetFile(Inet1, "http://www.fakeURL.com/~yup/picture.jpg", "c:\temp")

Public Sub GetInternetFile(Inet1 As Inet, myURL As String, DestDIR As String)
myURL = "http://www.vbcode.com/asp/showsn.asp?theID=232"
RealFile = "showsn.asp"
Dim myData() As Byte
Dim X


If Inet1.StillExecuting = True Then Exit Sub
myData() = Inet1.OpenURL(myURL, icByteArray)


For X = Len(myURL) To 1 Step -1
If Left$(Right$(myURL, X), 1) = "/" Then RealFile$ = Right$(myURL, X - 1)
Next X
myFile$ = DestDIR + "\" + RealFile$
Open myFile$ For Binary Access Write As #1
Put #1, , myData()
Close #1

End Sub