CURL常用命令

1.CURL向cgi post数据


curl -d 'mod=querysql&act=direct&sql=select+u+from+tb_user+where+u%3D%2756798465%27' 'http://10.142.22.44:61001/services/worker.fcgi


2.使用CURL下载文件内容

curl -o SkillInfo.xml http://183.60.64.230/huayuan/backend/xml/SkillInfo.xml
 必须指定下载文件名,例如:SkillInfo.xml。


3.使用curl查看网页所使用的web服务器

curl --head www.sina.com
  1. HTTP/1.0 301 Moved Permanently
  2. Date: Fri, 17 Aug 2012 02:42:17 GMT
  3. Server: Apache
  4. Location: http://www.sina.com.cn/
  5. Cache-Control: max-age=3600
  6. Expires: Fri, 17 Aug 2012 03:42:17 GMT
  7. Vary: Accept-Encoding
  8. Content-Length: 231
  9. Content-Type: text/html; charset=iso-8859-1
  10. Age: 2920
  11. X-Cache: HIT from xd33-75.sina.com.cn
  12. Connection: close

你可能感兴趣的:(curl,curl模拟浏览器,curl常用命令)