lua插件放到?按鍵精靈手機(jī)助手 安裝位置的 Plugin?文件夾里面?
使用curl必須保證/system/bin 和?/system/lib 文件夾里有 curl 和libcurl 兩個(gè)文件,有的curl 版本可能不需要libcurl

手機(jī)版按鍵精靈是通過(guò)lua的os.execute函數(shù)來(lái)執(zhí)行curl的

調(diào)用方法:

用法和linux的方式是一樣的:
os.execute(curl http://yesp.top)--獲取網(wǎng)頁(yè)源碼
以下是本人測(cè)試在按鍵精靈上可用的curl 用法:
--GET方式提交數(shù)據(jù)
curl?-G?-d?"name=value&name2=value2"?http://www.baidu.com
--POST方式提交數(shù)據(jù)
curl?-d?"name=value&name2=value2"?http://www.baidu.com #post數(shù)據(jù)
--以表單的方式上傳文件
curl?-F?file=@/tmp/me.txt?http://www.aiezu.com
curl -F key=123 -F data=123 -F file=@/sdcard/1.png http://yesp.top
--設(shè)置header
curl?-A?"Mozilla/5.0 Firefox/21.0"?http://www.baidu.com #設(shè)置http請(qǐng)求頭User-Agent
curl?-e?"http://pachong.org/"?http://www.baidu.com #設(shè)置http請(qǐng)求頭Referer
curl?-H?"Connection:keep-alive \nUser-Agent: Mozilla/5.0"?http://yesp.top
--http響應(yīng)頭處理
curl?-I?http://www.aiezu.com #僅僅返回header
curl?-D?/tmp/header?http://www.aiezu.com #將http header保存到/tmp/header文件
--curl認(rèn)證
curl?-u?aiezu:password?http://www.aiezu.com #用戶(hù)名密碼認(rèn)證
curl?-E?mycert.pem?https://www.baidu.com #采用證書(shū)認(rèn)證
--curl_ftp?幾種寫(xiě)法
curl ftp://ip:端口/路徑/ --user name:passwd
curl ftp://ip:端口/路徑/ name:passwd? ? #簡(jiǎn)潔寫(xiě)法
curl ftp://name:passwd@ip:端口/路徑/? ? #簡(jiǎn)潔寫(xiě)法2
--FTP上傳
curl --user user:pass -T /file/name ftp://ip:端口/路徑/
--FTP下載
curl ftp://ip:端口/路徑/ –u name:passwd -o size.zip
curl ftp://ip:端口/路徑/ –u name:passwd -o /保存路徑
--FTP刪除
curl -u name:passwd ftp://ip:端口/ -X 'DELE 路徑'
--列出ftp服務(wù)器上的目錄列表
curl ip:端口/路徑/ –u name:passwd
下載地址見(jiàn)評(píng)論
