Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. New In c and c++. Downloading data from a server

New In c and c++. Downloading data from a server

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++htmlcomsysadmin
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eli Nurman
    wrote on last edited by
    #1

    Hi. I am very new to C and C++, what is the best way of downloading data from a HTTP server, meaning, how to i download the HTML from http://www.google.com?

    M D A T 4 Replies Last reply
    0
    • E Eli Nurman

      Hi. I am very new to C and C++, what is the best way of downloading data from a HTTP server, meaning, how to i download the HTML from http://www.google.com?

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      Have a look at the MFC classes CHttpFile and CHttpConnection ... also, look at this article on CP : Retrieving a file via. HTTP[^] Max.

      Watched code never compiles.

      E 1 Reply Last reply
      0
      • E Eli Nurman

        Hi. I am very new to C and C++, what is the best way of downloading data from a HTTP server, meaning, how to i download the HTML from http://www.google.com?

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        One way would be with URLDownloadToFile(). Other ways exist, too.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        1 Reply Last reply
        0
        • M Maximilien

          Have a look at the MFC classes CHttpFile and CHttpConnection ... also, look at this article on CP : Retrieving a file via. HTTP[^] Max.

          Watched code never compiles.

          E Offline
          E Offline
          Eli Nurman
          wrote on last edited by
          #4

          Hi. i am developing to a linux device, is there any way without MFC?

          M 1 Reply Last reply
          0
          • E Eli Nurman

            Hi. i am developing to a linux device, is there any way without MFC?

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #5

            Well, since it's a Windows development site, I assume you were developing for Windows. on linux, yeah, there's probably something that does it; but it's probably more complicated. a quick googling returns this : http://curl.haxx.se/[^] or this : http://rosettacode.org/wiki/Web_scraping[^] just to give you a good start. good luck.

            Watched code never compiles.

            1 Reply Last reply
            0
            • E Eli Nurman

              Hi. I am very new to C and C++, what is the best way of downloading data from a HTTP server, meaning, how to i download the HTML from http://www.google.com?

              A Offline
              A Offline
              Aescleal
              wrote on last edited by
              #6

              I'd recommend cURL, it's got an interface only it's programmer could love but it's actually fairly easy to do what you want to do. Run, don't walk to http://curl.haxx.se/[^] and download it. Actually if you're using Linux it's probably available as a package in your distro. Cheers, Ash

              1 Reply Last reply
              0
              • E Eli Nurman

                Hi. I am very new to C and C++, what is the best way of downloading data from a HTTP server, meaning, how to i download the HTML from http://www.google.com?

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                very simple and good article for achieving your goal :- AmHttpUtilities[^]

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                Never mind - my own stupidity is the source of every "problem" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                E 1 Reply Last reply
                0
                • T ThatsAlok

                  very simple and good article for achieving your goal :- AmHttpUtilities[^]

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                  Never mind - my own stupidity is the source of every "problem" - Mixture

                  cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                  E Offline
                  E Offline
                  Eli Nurman
                  wrote on last edited by
                  #8

                  thanks for the help

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups