Saving a file URL

Discussion in 'C++' started by venky, Jun 17, 2008.

  1. venky

    venky Guest

    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
     
    venky, Jun 17, 2008
    #1
    1. Advertising

  2. venky

    Guest

    On Jun 17, 3:11 pm, venky <> 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.
     
    , Jun 17, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    881
  2. John Kandell
    Replies:
    4
    Views:
    4,205
    eeebop
    Dec 10, 2004
  3. Luis Esteban Valencia
    Replies:
    0
    Views:
    2,543
    Luis Esteban Valencia
    Jan 6, 2005
  4. woostersoz

    Saving XML file to an URL

    woostersoz, Jun 27, 2006, in forum: XML
    Replies:
    1
    Views:
    902
    Joe Kesselman
    Jun 27, 2006
  5. Lovely Angel For You

    Saving Images While Saving ASP Pages !

    Lovely Angel For You, Oct 2, 2003, in forum: ASP General
    Replies:
    1
    Views:
    222
    Curt_C [MVP]
    Oct 3, 2003
Loading...

Share This Page