downloading a file

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2005
Posts: 78
Reputation: nanodano is an unknown quantity at this point 
Solved Threads: 2
nanodano's Avatar
nanodano nanodano is offline Offline
Junior Poster in Training

downloading a file

 
0
  #1
Nov 7th, 2006
I have a question and I was hoping someone could point me in the right direction.

I know the IP address of a server I want to download a file from, and I know the path on the client hard disk I want to download it to. How could I use C++ to download a file? I have http, ftp or any other protocol available on the server. Should I start brushing up my TCP/IP knowledge?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: downloading a file

 
0
  #2
Nov 7th, 2006
>Should I start brushing up my TCP/IP knowledge?
Yes, unless you want to write a wrapper program.

wget is a program that simply gets a file from a url, and if you used a system() call to it, it would work. There's also a Windows version of wget at your disposal.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: downloading a file

 
0
  #3
Nov 7th, 2006
Hmm.. if you want to code this thign from scratch, you need to use some socket library. (like winsock for windows)

Maybe looking at this thread would help a bit:
http://www.daniweb.com/techtalkforums/thread50205.html

Hope it helped, bye.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC