Interacting with websites

If i would like to use data from a website and handle it in a program, what do i need to learn and where can i find a good tutorials for it?
Learn about socket ( http://beej.us/guide/bgnet/ ) or use some socket wrapper in c++.

Connect to http server at port 80. Send:
GET /index.html HTTP/1.1

and you will recieve something like
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Etag: "3f80f-1b6-3e1cb03b"
Content-Type: text/html; charset=UTF-8
Content-Length: 131
Connection: close

<html>
<head>
  <title>An Example Page</title>
</head>
<body>
  Hello World, this is a very simple HTML document.
</body>
</html>


source: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

Parse html body for information you need.
Thank you!
Topic archived. No new replies allowed.