Question:
Is their a function or can someone show me a c++ snippet for getting a webpage?
Wonkie
2008-11-24 10:03:57 UTC
I simply need a little help on getting webpages all I want is the raw html data. Like if you were to use c++ to open a txt file.
Three answers:
Tizio 008
2008-11-24 10:28:16 UTC
maybe this can help

http://www.codersource.net/win32_socket_client.html

but the you should study at least http protocol (i believe a simple GET /file could work... maybe)



i suggest you to take a look at curl lib

http://curl.haxx.se/libcurl/

http://curl.haxx.se/libcurl/cplusplus/

http://curl.haxx.se/download/curl-7.19.1-win32-ssl-sspi.zip
sean_mccully
2008-11-24 10:15:49 UTC
Found a nice C++ class for you, provides an example on how to use. Depending on what your looking to do, Perl/PHP/Python all provide much simpler interfaces for doing the same thing.
Peter H
2008-11-24 10:21:29 UTC
There is no such function in the basic C++ language, though it is possible that your C++ compiler includes an internet package. If not you will need to buy an appropriate package. See

https://www.componentsource.com/atoz/internet-comms/dll/visual-c/index.html


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...