Re: downloading from http
Try this
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
Private Sub cmdSave_Click()
Call URLDownloadToFile(0, "http://www.somesite.com/file.exe", _
"c:\path\file.exe", 0, 0)
End Sub
Iouri Boutchkine
[email protected]
Re: downloading from http
I have tried the code you suggested and it seems to work fine--do you also have the code for an upload??
Re: downloading from http
Check it out, but I did not try this.
Here is a solution in VB using the INet control.
Dim oFileSystem as new Scripting.FileSystemObject
s = "-----------------------------AaB03x" & vbCrLf & _
"content-disposition: form-data; name=""field1""; filename=""autoexec.bat""" & vbCrLf & _
"Content-Type: text/plain" & vbCrLf & vbCrLf & _
oFileSystem.GetFile("c:\autoexec.bat").OpenAsTextStream.ReadAll & _
"-----------------------------AaB03x--"
Inet1.Execute "<http://localhost/sample1.asp>", _
"POST", s, "Content-type: multipart/form-data, boundary=AaB03x"
Iouri Boutchkine
[email protected]