http://web-sniffer.net
提供了HTTP版本、请求方式、浏览器类型等,感觉很不错。
请求主机头
HTTP Request Header
Connect to 61.135.179.191 on port 80 ... ok
GET / HTTP/1.1[CRLF]
Host: www.sohu.com[CRLF]
Connection: close[CRLF]
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)[CRLF]
Accept-Encoding: gzip[CRLF]
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7[CRLF]
Cache-Control: no[CRLF]
Accept-Language: de,en;q=0.7,en-us;q=0.3[CRLF]
Referer: http://web-sniffer.net/[CRLF]
[CRLF]
返回主机头
HTTP Response Header
Name Value Delim
HTTP Status Code: HTTP/1.0 200 OK
Date: Thu, 12 Feb 2009 09:50:36 GMT
Server: Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a
Vary: Accept-Encoding,X-Up-Calling-Line-id,X-Source-ID,X-Up-Bearer-Type
Cache-Control: max-age=70
Expires: Thu, 12 Feb 2009 09:51:46 GMT
Last-Modified: Thu, 12 Feb 2009 09:47:53 GMT
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 53372
X-Cache: MISS from 19709705.29867846.28603073.sohu.com
Via: 1.0 19709705.29867846.28603073.sohu.com:80 (squid)
Connection: close
提供了HTTP版本、请求方式、浏览器类型等,感觉很不错。
请求主机头
引用
HTTP Request Header
Connect to 61.135.179.191 on port 80 ... ok
GET / HTTP/1.1[CRLF]
Host: www.sohu.com[CRLF]
Connection: close[CRLF]
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)[CRLF]
Accept-Encoding: gzip[CRLF]
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7[CRLF]
Cache-Control: no[CRLF]
Accept-Language: de,en;q=0.7,en-us;q=0.3[CRLF]
Referer: http://web-sniffer.net/[CRLF]
[CRLF]
返回主机头
引用
HTTP Response Header
Name Value Delim
HTTP Status Code: HTTP/1.0 200 OK
Date: Thu, 12 Feb 2009 09:50:36 GMT
Server: Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a
Vary: Accept-Encoding,X-Up-Calling-Line-id,X-Source-ID,X-Up-Bearer-Type
Cache-Control: max-age=70
Expires: Thu, 12 Feb 2009 09:51:46 GMT
Last-Modified: Thu, 12 Feb 2009 09:47:53 GMT
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 53372
X-Cache: MISS from 19709705.29867846.28603073.sohu.com
Via: 1.0 19709705.29867846.28603073.sohu.com:80 (squid)
Connection: close
1、确保系统安装了gcc、g++、make、libstdc++,没有则通过apt-get install gcc/g++...来安装,不过发现libstdc++在apt-get install gcc也会安装上了。
2、测试代码hello.cpp:
3、 gcc hello.cpp -o hello
/tmp/ccTZsfGk.o: In function `main':
hello.cpp:(.text+0x1c): undefined reference to `std::cout'
...........
再看一下man gcc,原来要用g++编译C++程序。
4、g++ hello.cpp -o hello
编译通过,生成hello,运行:./hellow
显示结果:
Hello world!
2、测试代码hello.cpp:
3、 gcc hello.cpp -o hello
/tmp/ccTZsfGk.o: In function `main':
hello.cpp:(.text+0x1c): undefined reference to `std::cout'
...........
再看一下man gcc,原来要用g++编译C++程序。
4、g++ hello.cpp -o hello
编译通过,生成hello,运行:./hellow
显示结果:
Hello world!