NAME
curl - transfer a URL

SYNOPSIS
curl [options] [URL...]

DESCRIPTION
curl is a client to get documents/files from or send documents to a server,
using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER, DICT, TELNET, LDAP or FILE).
The command is designed to work without user interaction or any kind of interactivity.
curl offers a busload of useful tricks like proxy support, user authentication, ftp upload,
HTTP post, SSL (https:) connections,cookies, file transfer resume and more.

URL
The URL syntax is protocol dependent. You'll find a detailed description in RFC 2396.

查看响应头
curl -I http://www.bbc.com

保存到文件
curl -o filename http://www.bbc.com

绑定ip测试
curl -X"GET" -H"Host: tools.bbc.com" -O http:/shenfenzheng.htm

从ftp下载
curl -u test:test -O ftp:/a.txt
或curl -O ftp://test:test@*.*.*.*:21/zhuh.txt
    -O Write output to a file named as the remote file

上传至ftp
curl -T ./t.xt ftp://test:test@*.*.*.*:21/

指定referer
curl -e http://www.baidu.com http://www.bbc.com

代理
curl "http://iframe.ip138.com/ic.asp"
curl -x *.*.*.*:3333 "http://iframe.ip138.com/ic.asp"

保存cookie
curl -c ./cookie01 http:/setCookie.php
或curl -D ./dumpheader http:/setCookie.php

发送cookie到服务器
curl -b ./cookie01 http:/showCookie.php

指定UA
curl -v -A "User-AgentMozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0"http://8.8.8.8/setCookie.php

续传
curl -C -O http://download.bbc.com/Setup_V2.4.exe

分块多进程下载
curl -r 0-1024000 -o "ie1" http://download.bbc.com/Setup_V2.4.exe &\
curl -r 1024001-2048000 -o "ie2" http://download.bbc.com/Setup_V2.4.exe &\
curl -r 2048001-4096000 -o "ie3" http://download.bbc.com/Setup_V2.4.exe &\
curl -r 4096001- -o "ie4" http://download.bbc.com/setupV2.4.exe &
cat ie* > ie.exe

使用POST方式提交表单
curl -d"cmd=login" -d"password=af8f9dffa5d420fbc2491416962ee" -d"username=testcurl"http://login.bbc.com/login.php

取状态码
curl -o /dev/null -s -w"%{http_code},%{time_total}" http://www.bbc.com

最新文章

  1. [Sass]声明变量
  2. SQL-表的各种查查查
  3. jquery CRUD一个元素class属性
  4. java分页问题
  5. 20151210study
  6. 使用XSD校验Mybatis的SqlMapper配置文件(1)
  7. gocode+auto-complete搭建emacs的go语言自动补全功能
  8. CSS成长之路----知识点篇
  9. HackerRank "New Year Chaos"
  10. C#中的集合
  11. InstallShield Limited Edition for Visual Studio 2013
  12. 编程内功修炼之数据结构—BTree(二)实现BTree插入、查询、删除操作
  13. BaseAdapter 注意的关键点!
  14. html语法之--使用图像映射
  15. spoj ONP - Transform the Expression 中缀转后缀
  16. Java 脚本化编程指南
  17. 剑指Offer_编程题_13
  18. day64 django django零碎知识点整理
  19. Linux操作系统配置Go语言编程环境
  20. 关于ionic如何到最新版本

热门文章

  1. 记一次autofac+dapper+mvc的框架搭建实践
  2. 记一次线上事故的JVM内存学习
  3. VNC黑屏解决办法
  4. MySQL赋权
  5. cStringIO 实现指定大小的字符串缓存
  6. 【xsy3355】图 思维
  7. [原创]K8 MSF Bind Shell TCP 连接工具
  8. 在MVC3中使用富文本编辑器:KindEditor的配置及上传图片
  9. 图片训练:使用卷积神经网络(CNN)识别手写数字
  10. python垃圾回收