获取Web服务器类型的方法
<span style="font-family: Verdana, Tahoma, sans-serif; font-size: 14px; line-height: 22px;">转载自:http://www.linuxorz.com/show-15-1.htmlCurl是一款用于在网络上传输数据的工具,支持HTTP, HTTPS, FTP, FTPS, TFTP, DICT,TELNET,LDAP等协议。通过curl你既可以将服务器的数据下载下来,也可以将本地的数据上传到服务器。curl的选项很多,大家可以参考curl manual。
最简单的用法,获取一个网站页面的源代码:
<div class="codeblock" style=""># curl www.g.cn
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.cn/webhp?source=g_cn">here</A>.
</BODY></HTML>
# curl www.google.cn
页:
[1]