Powerbasic Museum 2020-B

General Category => General Discussion => Topic started by: Patrice Terrier on August 28, 2011, 09:27:07 AM

Title: Downloading file from the Internet
Post by: Patrice Terrier on August 28, 2011, 09:27:07 AM
What is the best way to download a file from the internet, using these type of URL?

http://radio.dogmazic.net:8000/radio_dogmazic.ogg.m3u
http://players.creacast.com/creacast/dreyeckland/playlist.asx

Like when you right click on the url, and select "save the target file as".

Thank you
Title: Re: Downloading file from the Internet
Post by: Edwin Knoppert on August 28, 2011, 09:48:56 AM
UrlDownloadToFile() API
But a 2nd time caching may come into play.
I solve that by using the event callback and save the temp filename to be deleted.

Also note a cascading effect in those files, a file can point to another asx file and so on.
Title: Re: Downloading file from the Internet
Post by: Edwin Knoppert on August 28, 2011, 09:50:52 AM
Cache: DeleteUrlCacheEntry()
Title: Re: Downloading file from the Internet
Post by: Patrice Terrier on August 28, 2011, 11:22:29 AM
Thank you Edwin!