Download file from http url?

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Download file from http url?

Post by ricardo »

I want to download a file from a server from a http url.

Which is the fast and best way to do it? If a percent of the download could be available its better.


Thanks in advance.

Note:

I found Berikco example that works great!!!
I think my question is answwered, Thanks. :D
ARGENTINA WORLD CHAMPION
freak
PureBasic Team
PureBasic Team
Posts: 5944
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

It can also be done with a callback for the progress.

I made a tutorial about this here:
viewtopic.php?t=7846

As this is a bit of work to implement in your own code, i made a compact
include file for easy usage:
http://freak.purearea.net/code/DownloadUrlToFile.zip
(example included)

Explanations about the function are on the top of the include file.

Timo
Last edited by freak on Sat Oct 25, 2003 1:12 pm, edited 1 time in total.
quidquid Latine dictum sit altum videtur
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Freak,

Thanks for your answer.

I found a problem running the code:

IB.IBinding is not found.

Problem resolved: install new version of PB!!

Your code is great!!!!!8O

Thanks :D :D :D :D :D
ARGENTINA WORLD CHAMPION
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Download file from http url?

Post by PB »

> I want to download a file from a server from a http url.
> Which is the fast and best way to do it?

I know you asked for a progress meter, but if you're just wanting to get
a small file off the net (say less than 50k) then this is quick and easy:
viewtopic.php?t=2035
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Download file from http url?

Post by ricardo »

Thanks PB but i need to download bigger files.:(


In the other hand, i have found that Freak code is amazing, it can even resume the download. Its fast, secure, easy and with some very nice options. 8O :D
Last edited by ricardo on Fri Nov 07, 2003 3:59 pm, edited 1 time in total.
ARGENTINA WORLD CHAMPION
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post by RJP Computing »

@freak,
It looks like you have spent some time on this example. It is awsome!

I have a related question. How can I get this to wrk behind a proxy server? I am behind one at work that you have to login to. I know this can be done but how?

Any help would be awsome.

Thanks
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post by RJP Computing »

RJP Computing wrote:@freak,
It looks like you have spent some time on this example. It is awsome!

I have a related question. How can I get this to wrk behind a proxy server? I am behind one at work that you have to login to. I know this can be done but how?

Any help would be awsome.

Thanks

@Freak,
Have you had any luck with this?
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
freak
PureBasic Team
PureBasic Team
Posts: 5944
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Sorry, overlooked that post...

Actually, i don't have a proxy server here, so i can't help much.
My guess is, that if you have set up the proxy settings in the Internet
Explorer preferences, then it should work.

My code is actually just built around the UrlDownloadToFile_() Api, so if
you can make it work with this one, my code should work too.

Timo
quidquid Latine dictum sit altum videtur
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post by RJP Computing »

Actually it doesn't ever ask for my username and password. I do have my internet options setup right. It is something that isn't documented well because I can't find the answer anywhere.

Your function just times out.

If you think of anything it would be very helpful.

Thanks for your efforts
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
Post Reply