Saving a file URL

V

venky

Hi all,
Given a file url (internet url) , I need to save it on my hard
disk using c++ code. Is there anyway I can do this through pure c++ ?
The code needs to be portable on both windows and linux. Also, i do
not wish to use system calls usch as system("wget") etc. Plz guys..
could someone help me out ? I`m not even able to get a starting point.
Can it be done using sockets ?

Regards,
Venky
 
K

kasthurirangan.balaji

Hi all,
      Given a file url (internet url) , I need to save it on my hard
disk using c++ code. Is there anyway I can do this through pure c++ ?
The code needs to be portable on both windows and linux. Also, i do
not wish to use system calls usch as system("wget") etc. Plz guys..
could someone help me out ? I`m not even able to get a starting point.
Can it be done using sockets ?

Regards,
Venky

Hello,

if you want to save the url alone, it shouldn't be a problem using
fstream and string. But if you want the page contents the url points
to, then i see two cases. 1) The page is on the same machine - in this
case file copy is what required.stream iterators could be used here.
2) If the page is on a different box - then there is no standard c++
way. you may want to look at boost asio.

Thanks,
Balaji.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top