943,929 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 5142
  • C++ RSS
Sep 16th, 2007
0

Reading Source code of a webpage

Expand Post »
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??
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
yassar is offline Offline
35 posts
since May 2005
Sep 16th, 2007
0

Re: Reading Source code of a webpage

I don't think you can do this with standard c++. Or if you can, you may need third party libraries. A quick search suggests going with the microsoft windows option would seem the easiest.

[search]c++ read webpage[/search]
http://www.daniweb.com/forums/thread50205.html
Look at the msdn website and the documentation for wininet perhaps?
Last edited by iamthwee; Sep 16th, 2007 at 5:34 am.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Sep 16th, 2007
2

Re: Reading Source code of a webpage

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....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
Reputation Points: 1159
Solved Threads: 285
Posting Virtuoso
vijayan121 is offline Offline
1,606 posts
since Dec 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: windows api help
Next Thread in C++ Forum Timeline: help with windows api in c++





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC