Sign in to follow this  

Downloading stuff from within my app

This topic is 4593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey! I'd like to download a file from within my C++ app and store it on disk and/or RAM. At the moment, I use SDL_Net for that purpose, but I have to establish the tcp/ip connection and do all error handling on my own. So I wonder if there is an alternative solution for this. It should run on Windows as well as Linux and should do some error handling (could not get connection or whatever) and be as easy as #include <fancylib.h> ... buffer = fancylib_download("http://..."); Well, something like this. Any ideas?

Share this post


Link to post
Share on other sites
I dunno about linux, but for windows look up the following functions:

InternetOpen
InternetOpenUrl / FtpOpenFile
InternetQueryDataAvailable
InternetReadFile
InternetCloseHandle

It's very easy to download files from http/ftp etc using these functions.

Share this post


Link to post
Share on other sites
eq: Your solution looks rather Windows-specific, but thanks anyway.

Feral: cURL seems to be what I'm looking for. Thanks!

Share this post


Link to post
Share on other sites

This topic is 4593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this