download

how can i download a file from the web in vb? i dont want any user prompts like where i would like to download it too... kinda like a download manager (GetRight).
I need source! ;)
TCPIP2600Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sdland1Connect With a Mentor Commented:
theres a sample at http://lightning.prohosting.com/~shell123 search for tlsNetmicro1.zip also search for ftpsvr.bas
0
 
VbmasterCommented:
Here's a way to download a file asynchronously, and you can download as many files as possible at the same time, or just one file at a time, you decide. The code you need is at (for free of course)..

http://vbaccelerator.com/codelib/submit/asynctx.htm
0
 
VbmasterCommented:
If you do not want to use the above control.. for some strange reason.. here's the code to use the Inet control for downloading a file..

  Dim varData() As Byte
  Dim Filenr as Integer

  'Connect to the page
  Call Inet1.Execute("www.altavista.com", "get index.html")

  'Must connect first before we can try to download the file
  Do
    DoEvents
  Loop While Inet1.StillExecuting

  'Download the page and save to a file on disk
  Filenr = FreeFile
  Open "C:\test.html" For Binary As #Filenr
  Do
    varData = Inet1.GetChunk(2048, icByteArray)
    Put #Filenr, , varData
  Loop Until (UBound(varData) = -1)
  Close #Filenr

This example code will save the http://www.altavista.com/index.html and save it to the file "C:\test.htm" on your harddrive.
0
 
sdland1Commented:
theres a sample at http://lightning.prohosting.com/~shell123 search for tlsNetmicro1.zip also search for ftpsvr.bas
0
All Courses

From novice to tech pro — start learning today.