anybody know any nice networking classes - ftp, http file access?

Started by
6 comments, last by kindfluffysteve 21 years, 2 months ago
hello. was wondering if anybody knew of any nice c++ classes/functions that would let me do something like this: for http: downloadfile(char *url, char *fname); and it would in an ideal world work like this download("http://www.blahblah.com/pics/goldfish.jpg","fishy.jpg"); this ideal function would grab that file and save it in the applications folder called ''fishy.jpg'' does such a set of functions exist for c/c++?
Advertisement
If you used *unix, like linux you could embed a system call into your program that would execute "wget" to retrieve the file you wanted.

RandomTask
ahh sadly im writing a game project thing in win32.
You use winsock, connect to the host, and learn the HTTP 1.1 protocol (hint: listen on port 80 on your local machine and point IE at it then save what IE sends).

All the functions exist. You just have to know how to put them together.

Ben


IcarusIndie.com [ The Labyrinth | DevZone | Indie Mail | Hosting | Tiberian Merchandise | GameShot | Fun With Cutouts ]
I wrote a sockets wrapper class that can do simple downloads of webpages - see the first code example on this page:
http://www.zppz.com/libraries/minisock/about/index.jsp
With some small modifications to the demo program, it would be able to save files, you''ll probably need to know a little more HTTP to do it properly though.

----------
http://www.zppz.com <- game dev stuff
quote:Original post by kindfluffysteve
does such a set of functions exist for c/c++?

URLDownloadToFile does that.
thanks people.
I got one better:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/about_wininet.asp

Much better than rolling your own, but won''t be cross-platform.

Interim.

This topic is closed to new replies.

Advertisement