課題4


課題4:HTTPクライアントの作成 ソケットおよびHTMLを使ってWWWサーバから任意のURLのページを取得し、標準出力に出力するプログラムを作成せよ。

プログラム kadai4p.c

以下実行結果(googl)

[nw0514:~/HTTP] j05014% ./httpget http://www.google.co.jp/
HTTP/1.0 200 OK
Cache-Control: private
Content-Type: text/html
Set-Cookie: PREF=ID=567753a22a9f7095:TM=1138349910:LM=1138349910:S=0WL- qx3I6qqDJaUg; expires=, -Dec-2038 21:00:07 GMT; path=/; domain=.google.com
Server: GWS/2.1
Date: :Mon, 11 Dec 2006 21:18:30 Connection: Close <html> <head> <meta http-equiv="content-type" content="text/html; charset=IS6O-8859-1"> <title> Google </title> <style> <!-- body,td,a,p,.h{font-family:arial,sans-serif;} .
.
.