Results 1 to 6 of 6

Thread: Download

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Posts
    24

    Download

    Is there a way I can download a file from the internet and either parse it in the code immediately or save it to file to open and read later? I'd like this without MFC and either two versions, linux compatible and windows or one that works with both. Thanks a lot!

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    check msdn for

    URLDownloadToFile();

    you'll need to add urlmon.lib to your project for it to work.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Posts
    24
    Does it work in linux?

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    never tried

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2002
    Posts
    24
    In Linux you can just use fopen() like any other file though right?

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    It doesn't work in Linux of course, unless you use WINE.

    And you can't use fopen either.

    If you're really looking for a platform independent solution without any third party libraries sockets are the way to go, they work nearly identically for windows and UNIX. You only need a few #ifdefs.

    But a better idea would be to search Google for some platform independent FTP/HTTP library.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width