嵌入式 Wget使用一点方法
来源:互联网 发布:伴读软件 编辑:程序博客网 时间:2024/06/08 13:36
编译的时候请使用--without-ssl --disable--http
wget使用方法(some)
前提说明:
Web服务器http://127.0.0.1:8333/test.php 是我自己搭建的一台nginx+phpweb服务器
1 post请求
Wget默认发送Get请求,通过指定参数--post-dataor --post-file 这两个选项
e.g wget--post-data "aaaa" http://127.0.0.1:8333/test.php
wget--post-data "user=foo" http://127.0.0.1:8333/test.php
wget–post-file post_file http://127.0.0.1:8333/test.php
2 head请求
wget --debug--spider http://127.0.0.1:8333/test.php
--spider并不下载文件,通过head请求服务器,获取web服务器响应
3 –no-cache禁用缓存
e.g wget–no-cache http://127.0.0.1:8333/test.php
请求数据包头部Pragma:no-cache,不使用缓存,http1.1加上Cache-Control: no-cache, must-revalidate
4 –referer使用referer
Referrer主要用户点击的上一个页面,一般可以用做防盗链技术,防盗链可以在url后面加一个key=value加密字段,或者使用特定referer字段。
e.g wget–debug –referer www.baidu.com http://127.0.0.1:8333/test.php
5 显示wget帮助和版本信息
Wget –v or wget –h
6 –e 就是执行命令
e.g wget-e "postdata=111111111" http://localhost:8333/test.php
这种形式和wget –post-data=”11111111” http://localhost:8333/test.php是相同的。
7 logfile (-o)把debug信息输出到文件
e.g wget http://localhost:8333/test.php -ologfile
8 referer设置
e.g wget --debug --referer "www.baidu.com/dsadsa" www.baidu.com/index.html
- 嵌入式 Wget使用一点方法
- 使用wget下载jdk方法
- 使用wget 命令下载JDK的方法
- wget命令部分参数使用一般方法
- 嵌入式 wget初学教程
- wget使用
- wget使用
- wget 使用
- wget使用
- wget 使用
- wget使用
- wget使用
- wget 使用
- wget 使用
- wget使用
- wget使用
- wget 使用
- wget使用
- 嵌入式 wget 非递归下载
- 被缢死的文明 傅雷46年忌
- PAT Advanced Level 1036(Java)
- Cocos2d-x入门实战(四)CCDirector类
- POJ-3368
- 嵌入式 Wget使用一点方法
- 解决Intel Nvidia双显卡笔记本电脑在Ubuntu、Mint下无法用Fn键调节屏幕亮度的问题
- 阿里巴巴2015校园招聘面试大礼包
- Python学习杂记九
- 开源夏令营结题报告
- [NWPU][2014][TRN][17]最小生成树 B - 基础 POJ 2421
- LeetCode-Decode Ways
- 2014年吉林省赛总结
- 浅谈IOS架构