I'm making a program to setup a server, but I can't find out how to download a file from the internet in the c++ program. Preferably downloading a library or something. Also, I am still a beginning programmer. I'm using: Microsoft Windows 7 Professional 64x Notepad ++ Borland's C++ compiler v5.1
Asked
Active
Viewed 398 times
-1
-
2Why are you using a 10+ year old compiler? – Carl Norum Jan 16 '13 at 23:32
-
4Borland 5.1? What is this... 1999? – Nik Bougalis Jan 16 '13 at 23:33
-
2Check out [libcurl](http://curl.haxx.se/libcurl/). – Some programmer dude Jan 16 '13 at 23:34
-
1So you're using a very old compiler with a very poor text editor to try to do something very advanced - setting up a server and downloading files in a system-level programming language. My recommendation: start with a high level language (like Ruby or Python) and _then_ move on to lower-level languages, like C++ – Matt Jan 16 '13 at 23:35
-
@NikBougalis wow lol, maybe his mentor is making him use outdated technology so he appreciates modern conveniences – CQM Jan 16 '13 at 23:44
-
1Why are you using such an ancient compiler? Get Visual Studio. Microsoft even provides [a free version](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop) if you have budgeting issues. – Marcelo Cantos Jan 16 '13 at 23:46
2 Answers
3
There are many ways of doing that. The best for you way to go about this, in my opinion, is by using cURL library (aka libcurl
). Start from reading some documentation. This example can also be helpful as it does exactly that. And of course you can always go other (less popular?) ways:
- Use Qt Network library (example).
- Use Poco C++ Libraries (here is some introductory PDF).
- Find some other libraries and try them out.
- Do it yourself.
Hope it helps.

Community
- 1
- 1
1
Well, based on the choice of compiler, I see you want the hard way. WinInet will work. If you feel very adventurous, try windows sockets.

Eugene
- 7,180
- 1
- 29
- 36