Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Saving a file URL

Reply
Thread Tools

Saving a file URL

 
 
venky
Guest
Posts: n/a
 
      06-17-2008
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
 
Reply With Quote
 
 
 
 
kasthurirangan.balaji@gmail.com
Guest
Posts: n/a
 
      06-17-2008
On Jun 17, 3:11*pm, venky <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving XML file to an URL woostersoz XML 1 06-27-2006 12:17 PM
EXCEL question saving a file saving the the first column as read only Luis Esteban Valencia ASP .Net 0 01-06-2005 07:02 PM
Saving DataTable to session vs saving a Custom object. John Kandell ASP .Net 4 12-10-2004 05:08 AM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments