Author Topic: Downloading file from the Internet  (Read 3431 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Hero Member
  • *****
  • Posts: 934
  • User-Rate: +62/-1
  • Gender: Male
    • www.zapsolution.com
Downloading file from the Internet
« 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
« Last Edit: August 28, 2011, 09:28:54 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
  • Gender: Male
    • Hellobasic.com
Re: Downloading file from the Internet
« Reply #1 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.

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
  • Gender: Male
    • Hellobasic.com
Re: Downloading file from the Internet
« Reply #2 on: August 28, 2011, 09:50:52 AM »
Cache: DeleteUrlCacheEntry()

Offline Patrice Terrier

  • Hero Member
  • *****
  • Posts: 934
  • User-Rate: +62/-1
  • Gender: Male
    • www.zapsolution.com
Re: Downloading file from the Internet
« Reply #3 on: August 28, 2011, 11:22:29 AM »
Thank you Edwin!
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com