Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Saving a file URL (http://www.velocityreviews.com/forums/t620613-saving-a-file-url.html)

venky 06-17-2008 10:11 AM

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

kasthurirangan.balaji@gmail.com 06-17-2008 11:59 AM

Re: Saving a file URL
 
On Jun 17, 3:11*pm, venky <venkys.1...@gmail.com> wrote:
> 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.


All times are GMT. The time now is 08:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.