How to get websites source

Hello everyone

I want to ask for a full simple code.
I'm creating console application with dev c++. I need a code which prints a text from a file in website. For example http://www.google.com/robots.txt or .php I need just one line to be print in this case it would be "User-agent: *".

Thanks.
You need to send the proper HTTP requests through the proper ports and process the responses.

Many OS browsers have source that you can peruse to see how it is done:
http://www.mozilla.org/developer/
http://lynx.browser.org/

(It isn't particularly difficult, but it isn't as simple as you think, methinks.)

Hope this helps.
While it's fairly easy to do it manually, you could just use an existing library such as libcurl.
Oh yes, lubcurl +1
Topic archived. No new replies allowed.