470,855 Members | 1,317 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Saving a file URL

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
Jun 27 '08 #1
1 1368
On Jun 17, 3:11*pm, venky <venkys.1...@gmail.comwrote:
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.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by G-Factor | last post: by
5 posts views Thread by TheGanjaMan | last post: by
reply views Thread by Speilman_54 | last post: by
1 post views Thread by Allie | last post: by
6 posts views Thread by Eddie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.