Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading a file...

Status
Not open for further replies.

ronnyjljr

IS-IT--Management
Nov 23, 2003
249
0
0
US
If I wanted to download a file from a web server, how would I go about doing it? Would I use Sockets or is than an easier way?


Thanks,
Ron

typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
What's the context of the question?

For example, is this part of some larger program, then how would this be integrated with that program?

There are many "easier" ways, how about some clues as to which might be easiest for you.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
What OS?
Does it need to be in C or can you use C++ or Java...?
 
Hi,

The program is stand alone and text based written from scratch. I am using GCC on Ubuntu to compile. Lets say given a text or CSV (commas seperated value) file location such as:

or

I am looking to be able to download files from addresses that would cause a "save file as" prompt to appear in a web browser.

I'd prefer to do it in C/C++ rather than Java just for my own knowledge.

Thanks,
Ron



typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
An intermediate way would be to use a network application library like libcurl to take care of a lot of the lower level protocol issues of talking to web servers.

Or if you really want to do everything from first principles, then you'll need beej and the RFC's which describe the various protocols (eg. HTTP) involved.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Curl is exactly what I wanted. Thanks!
Though, the developer docs could be a bit more clear.

~Ron

typedef map<GiantX,gold, less<std::shortestpathtogold> > AwesomeMap;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top