anybody know any nice networking classes - ftp, http file access?
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++?
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
RandomTask
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 ]
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
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.
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.
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
Popular Topics
Advertisement