User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,468 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,813 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 1280 | Replies: 2
Reply
Join Date: May 2005
Location: Turkey
Posts: 21
Reputation: yassar is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
yassar's Avatar
yassar yassar is offline Offline
Newbie Poster

Reading Source code of a webpage

  #1  
Sep 16th, 2007
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??
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,832
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 324
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: Reading Source code of a webpage

  #2  
Sep 16th, 2007
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.

c++ read webpage
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.
Reply With Quote  
Join Date: Dec 2006
Location: india
Posts: 1,085
Reputation: vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all 
Rep Power: 9
Solved Threads: 163
vijayan121 vijayan121 is offline Offline
Veteran Poster

Re: Reading Source code of a webpage

  #3  
Sep 16th, 2007
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 2:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC