首页 > 其他 > 详细

curl 常用指令整理

时间:2014-03-23 09:10:42      阅读:373      评论:0      收藏:0      [点我收藏+]

1. 抓網頁內容,預設 HTTP GET Method

curl http://xxx

 

2. 使用 HTTP POST Method

curl -d "id=xxx&book=ooo" http://xxx

 

3. 抓網頁內容,輸出檔案

curl -o FileName.html http://xxx

 

4. 下載檔案(注意:是大寫的英文O)

curl -O http://xxx/FileName.zip

 

5. 下載 FTP 檔案

curl -u UserName:Passwd ftp://ip:port/path/file

curl ftp://UserName:Passwd@ip:port/path/file

 

6. 上傳檔案 HTTP PUT Method

curl -T LocalFile -u UserName:Passwd ftp://ip:port/path/file

curl -T LocalFile http://xxx.cgi

 

參考網址: http://evelynnote.blogspot.tw/2011/03/curl.html

curl 常用指令整理,布布扣,bubuko.com

curl 常用指令整理

原文:http://www.cnblogs.com/yijay/p/3618319.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!