Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download File using HTTP

Status
Not open for further replies.

dr486

Programmer
Jan 9, 2002
105
AU
Im trying to download a file using HTTP...does anybody have any ideas

dr
 
Ive just started playing with the Webbrowser component for an application I am developing. I'm scratching my head to resolve some of my problems but the file download looks like a piece of cake.

Just add a Webbrowser component to your form and in the Form_Load try WebBrowser1.Navigate"
That should get you started.

Good Luck

Experience is something you don't get until just after you need it.
 
Hi
to make a HTTP petition you can do that:

Use a Inet control, from the "Ms Internet Transfer Control 6.0 (SP4)" and configure it:

With Cnx_HTTP
.Protocol = icHTTP
.AccessType = icUseDefault
.URL = s_URL_to_File
End With
Cnx_HTTP.Execute , "GET"

And, finally, in the Inet's StateChanged() event, catch the response (string/file):

if State = Case icResponseCompleted
v_Tmp = Cnx_HTTP.GetChunk(1024, icByteArray)
Do While LenB(v_Tmp) > 0
v_File = v_File & v_Tmp
v_Tmp = Cnx_HTTP.GetChunk(1024, icByteArray)
Loop
'From here, call a method that saves the file.
End If


Well. That's all
I have similar code, but to retrieve text files (html,txt,etc) from web

Good luck!
;-)
 
Hello,
I want to get a file from my serveur...
How can I do taht, please I need a fulls cript.
by exempel :
I want to get this file on my local hard disk

Thanks in advance

Guillaume
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top