@@ -134,13 +134,13 @@ curl URL --silent
134
134
使用选项` -O ` 将下载的数据写入到文件,必须使用文件的绝对地址:
135
135
136
136
```
137
- curl http://man.linuxde.net /text.iso --silent -O
137
+ curl http://wangchujiang.com /text.iso --silent -O
138
138
```
139
139
140
140
选项` -o ` 将下载数据写入到指定名称的文件中,并使用` --progress ` 显示进度条:
141
141
142
142
```
143
- curl http://man.linuxde.net /test.iso -o filename.iso --progress
143
+ curl http://wangchujiang.com /test.iso -o filename.iso --progress
144
144
######################################### 100.0%
145
145
```
146
146
@@ -162,15 +162,15 @@ curl -C -URL
162
162
使用` --referer ` 选项指定参照页字符串:
163
163
164
164
```
165
- curl --referer http://www.google.com http://man.linuxde.net
165
+ curl --referer http://www.google.com http://wangchujiang.com
166
166
```
167
167
168
168
** 用curl设置cookies**
169
169
170
170
使用` --cookie "COKKIES" ` 选项来指定cookie,多个cookie使用分号分隔:
171
171
172
172
```
173
- curl http://man.linuxde.net --cookie "user=root;pass=123456"
173
+ curl http://wangchujiang.com --cookie "user=root;pass=123456"
174
174
```
175
175
176
176
将cookie另存为一个文件,使用` --cookie-jar ` 选项:
@@ -191,7 +191,7 @@ curl URL -A "Mozilla/5.0"
191
191
其他HTTP头部信息也可以使用curl来发送,使用` -H ` "头部信息" 传递多个头部信息,例如:
192
192
193
193
```
194
- curl -H "Host:man.linuxde.net " -H "accept-language:zh-cn" URL
194
+ curl -H "Host:wangchujiang.com " -H "accept-language:zh-cn" URL
195
195
```
196
196
197
197
** curl的带宽控制和下载配额**
@@ -217,23 +217,23 @@ curl URL --max-filesize bytes
217
217
使用curl选项 -u 可以完成HTTP或者FTP的认证,可以指定密码,也可以不指定密码在后续操作中输入密码:
218
218
219
219
```
220
- curl -u user:pwd http://man.linuxde.net
221
- curl -u user http://man.linuxde.net
220
+ curl -u user:pwd http://wangchujiang.com
221
+ curl -u user http://wangchujiang.com
222
222
```
223
223
224
224
** 只打印响应头部信息**
225
225
226
226
通过` -I ` 或者` -head ` 可以只打印出HTTP头部信息:
227
227
228
228
```
229
- [root@localhost text]# curl -I http://man.linuxde.net
229
+ [root@localhost text]# curl -I http://wangchujiang.com
230
230
HTTP/1.1 200 OK
231
231
Server: nginx/1.2.5
232
232
date: Mon, 10 Dec 2012 09:24:34 GMT
233
233
Content-Type: text/html; charset=UTF-8
234
234
Connection: keep-alive
235
235
Vary: Accept-Encoding
236
- X-Pingback: http://man.linuxde.net /xmlrpc.php
236
+ X-Pingback: http://wangchujiang.com /xmlrpc.php
237
237
```
238
238
239
239
** get请求**
0 commit comments