C++ read online text file

I need to find some way to read from an online text file, but I'm not quite sure where to even start with this... I'm not very familiar with networking code... Anyone know any helpful classes and methods?
There are libraries that fetch text from an HTTP source. Check out libcurl or libfetch.
Thanks, I'll look into those... libcurl looks pretty promising.

EDIT: Thanks, libcurl looks perfect for what I am trying to do!

One question though: I can see that curl.exe has an option to output C source for the command just executed; do you think I'm better off using the C code, with which I am not very familiar, output by curl.exe and building on that, or starting from scratch with my own C++ code? Can I use C syntax in C++? Also, in the source that is output, I'm not sure which options in there are necessary and which aren't, if any, and I'm also not very familiar with memory management, so I'm not quite sure what to do with option setting lines like:

1
2
3
4
5
6
  /* curl_easy_setopt(hnd, CURLOPT_WRITEDATA, 0x22fb10); [REMARK] */
  /* curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, 0x401bf0); [REMARK] */
  /* curl_easy_setopt(hnd, CURLOPT_READDATA, 0x22f818); [REMARK] */
  /* curl_easy_setopt(hnd, CURLOPT_READFUNCTION, 0x401de0); [REMARK] */
  /* curl_easy_setopt(hnd, CURLOPT_SEEKDATA, 0x22f818); [REMARK] */
  /* curl_easy_setopt(hnd, CURLOPT_SEEKFUNCTION, 0x401da0); [REMARK] */


About which the commented heading says:

/* Lines with [REMARK] below might need to be modified to make this code usable.*/

Other option lines have one of four values in place of a memory location:

0
1
64d
NULL

Thanks for any help on this :D
And let me know if you need more information.

EDIT: And I guess that's more like three questions... but whatever.

EDIT AGAIN: Nevermind, I've figured out what I needed to. Thanks for the help!
Last edited on
Topic archived. No new replies allowed.