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.