How to download an URL (cross-platform)

Discussion in 'C++' started by Simon, Aug 24, 2006.

  1. Simon

    Simon Guest

    Is there a simple, cross-platform method of downloading an URL. I can
    in Python by typing:

    data = urllib2.urlopen('www.example.com/example file.html').read()

    and I was wondering if there was an easy way to do that in C or C++
    (without using some Microsoft/Visual Studio or Mac-only method). If you
    know of a way, please reply; thanks in advance.

    Simon
    Simon, Aug 24, 2006
    #1
    1. Advertising

  2. "Simon" <> wrote in message
    news:...
    : Is there a simple, cross-platform method of downloading an URL. I can
    : in Python by typing:
    :
    : data = urllib2.urlopen('www.example.com/example file.html').read()
    :
    : and I was wondering if there was an easy way to do that in C or C++
    : (without using some Microsoft/Visual Studio or Mac-only method). If you
    : know of a way, please reply; thanks in advance.

    Of course the standard C++ library provides nothing for that, but
    cross-platform libraries exist.
    A popular choice seems to be libcurl: http://curl.haxx.se/libcurl/

    hth
    --
    http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
    Ivan Vecerina, Aug 24, 2006
    #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. Timothy V

    cross-platform

    Timothy V, Aug 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,081
    Herman Eldering
    Aug 24, 2003
  2. Andrew Thompson

    Re: cross-platform database???

    Andrew Thompson, Aug 11, 2003, in forum: Java
    Replies:
    3
    Views:
    336
    Tanel
    Aug 11, 2003
  3. jcc
    Replies:
    15
    Views:
    4,699
    Nigel Wade
    May 12, 2006
  4. Coca
    Replies:
    15
    Views:
    641
    Alan Balmer
    Jan 14, 2004
  5. Kaspar Schiess

    platform.rb (was: PLATFORM tests)

    Kaspar Schiess, Nov 25, 2005, in forum: Ruby
    Replies:
    0
    Views:
    125
    Kaspar Schiess
    Nov 25, 2005
Loading...

Share This Page