curl 常用指令整理

时间:2014-03-23 09:10:42   收藏:0   阅读:379

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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!