| View previous topic :: View next topic |
| Author |
Message |
Tronix Member
Joined: 18 Jan 2005 Posts: 3 Location: DK - Denmark
|
Posted: 18/01/05 12:15 Post subject: How to download a file from the web? |
|
|
Hey! I couldn't find this subject in any thread so here goes:
I want to write an application (in Delphi) that can download certain files from a web-site.
Fx. If the user press a button the program downloads www.some-url.com/somefile.dat and saves it on the HD.
How do I do that?
/Valdemar |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 61 Location: Netherlands
|
|
| Back to top |
|
 |
Tronix Member
Joined: 18 Jan 2005 Posts: 3 Location: DK - Denmark
|
Posted: 19/01/05 11:03 Post subject: |
|
|
a little source would be nice..
I tried the urlmon module, but I get the BindStatusCallback.OnProgress()-function to work correctly
\Valdemar |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 61 Location: Netherlands
|
|
| Back to top |
|
 |
Tronix Member
Joined: 18 Jan 2005 Posts: 3 Location: DK - Denmark
|
Posted: 19/01/05 11:30 Post subject: |
|
|
That works perfect...
Thank you very much!
\Valdemar |
|
| Back to top |
|
 |
Stefan Junior Member
Joined: 27 Sep 2004 Posts: 61 Location: Netherlands
|
Posted: 19/01/05 11:42 Post subject: |
|
|
Please keep in mind that there might be more to it than this.
When downloading via Internet Explorer you get all the "nice features" included, like caching for instance:
Suppose you download "program.exe" twice; first time it's version 1.0 and the second time it's version 2.0; second time IE might just "download" the cached version 1.0 and not the intended version 2.0...
Apart from that I've found downloading via proxies doesn't always work and if the user doesn't use IE and therefor his/hers settings in IE are screwed up, you will not be able to download either...
Cheers,
Stefan |
|
| Back to top |
|
 |
|