Board index » cppbuilder » Download a file using BCB4

Download a file using BCB4

Hi,

I would like to know how to initiate a download from the web of a file to a PC using BCB4
For example: clicking on certain button will download this file
http://media.ford.com/PDF/jan2002sales.pdf to c:\Windows\Temp

thanks in advance
Fred
fmas...@hotmail.com

 

Re:Download a file using BCB4


You need an HTTP component for that (unless you want to implement the raw
TCP yourself manually).

Have a look at Indy, http://www.nevrona.com/indy
It has a TIdHTTP component (amongst dozens of others)

If you want to do it manually, you can use TClientSocket.  You'll need to
look at the following RFCs to know what kind of data to send and receive:

Hypertext Transfer Protocol version 1.0 (HTTP/1.0), RFC 1945
http://www.ietf.org/rfc/rfc1945.txt

Hypertext Transfer Protocol version 1.1 (HTTP/1.1), RFC 2616
http://www.ietf.org/rfc/rfc2616.txt

Gambit

Quote
"Fredy" <fmas...@hotmail.com> wrote in message news:3c73cb3e$1_2@dnews...
> I would like to know how to initiate a download from the web of a file to
a PC using BCB4
> For example: clicking on certain button will download this file
> http://media.ford.com/PDF/jan2002sales.pdf to c:\Windows\Temp

Other Threads