0

I am trying to read source code of a webpage in C++. I haven't gone too much of a way. Can I read it as a text File??

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by vijayan121
2

using libcurl would be a portable way. http://curl.haxx.se/libcurl
source or binaries for a number of platforms are available http://curl.haxx.se/download.html

libcurl can be used directly from c++. curlpp gives a c++ wrapper that uses stl, is exception and type safe; so you may want to use it.
http://rrette.com/textpattern/index.php?s=cURLpp
http://rrette.com/textpattern/index.php?s=file_download&id=35

you could also use curl from the command line.
to retriev a number of web pages (eg. to mirror a complete website), use wget
http://www.gnu.org/software/wget/
for windows: http://www.christopherlewis.com/WGet/WGetFiles.htm

Votes + Comments
nice post!{i didn't know about libcurl}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.