Sign in to follow this  

Fetching a web page with C++

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Please don't crosspost

Other then that, get yourself a general (non language specific) network tutorial first, then look up the commands specific to your prefered language. Next you need a tutorial on which commands you need to send to a webserver. And if you want to parse and display the html page get yourself a browser. Or be prepared for a real lot of work.

Share this post


Link to post
Share on other sites
Or if you are really lazy and run linux you can use system("wget ..."); // don't now the arguments for wget
To store the page in a temporary file, then open that file from C++

Share this post


Link to post
Share on other sites
Quote:
Original post by twanvl
Or if you are really lazy and run linux you can use system("wget ..."); // don't now the arguments for wget


example usage of wget:

panda@industry:~$ wget http://www.yahoo.com/
--12:40:58-- http://www.yahoo.com/
=> `index.html'
Resolving www.yahoo.com... done.
Connecting to www.yahoo.com[66.94.230.46]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=> ] 31,654 176.64K/s

12:40:58 (176.64 KB/s) - `index.html' saved [31654]


another usage:

panda@industry:~$ wget ftp://path_to_file/
etc etc etc

Share this post


Link to post
Share on other sites

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this