ChinaUnix.net
相关文章推荐:

curl 超时时间

请各位大虾指点下:在curl中可以使用哪个参数来设置连接超时啊?指定一个最大的连接时间,当超时时,curl可以自动断开。请说明下参数具体的使用格式和方式,谢谢各位大虾~ 祝所有大虾新春快乐,新年有新气象。

by oda9999 - Shell - 2011-04-20 12:49:35 阅读(8474) 回复(3)

相关讨论

curl -o /dev/null -s -w "%{time_connect}:%{time_starttransfer}:%{time_total}\n" http://www.sina.com 返回内容如下: 0.103:0.133:0.133 通过 -o 参数发送到 /dev/null。-s 参数去掉所有状态信息。-w 参数让 curl 写出表 1 列出的计时器的状态信息: 计时器 描述: time_connect 建立到服务器的 TCP 连接所用的时间 time_starttransfer 在发出请求之后,Web 服务器返回数据的第一个字节所用的时间 time_total 完成请求所...

by peacock66 - Linux文档专区 - 2009-01-12 11:31:53 阅读(1640) 回复(0)

监控站点首页下载时间

curl -o /dev/null -s -w ‘%{time_total}’ http://www.miotour.com

curl -o /dev/null -s -w ‘%{http_code}’ http://www.miotour.com

curl -o /dev/null -s -w %{http_code}:%{time_connect}:%{

by nianzong - Web开发 - 2011-12-21 08:44:51 阅读(4976) 回复(0)

Usage: curl [options...] Options: (H) means HTTP/HTTPS only, (F) means FTP only -a/--append Append to target file when uploading (F) -A/--user-agent User-Agent to send to server (H) --anyauth Pick "any" authentication method (H) -b/--cookie Cookie string or file to read cookies from (H) --basic Use HTTP Basic Authentication (H) -B/--use-ascii Use ASCII/text ...

by ilovit - Linux文档专区 - 2009-03-19 10:01:24 阅读(788) 回复(0)

今天看到curl的用法,不错记录一下。 原文地址: http://www.linuxidc.com/Linux/2008-01/10891p2.htm Linux curl使用简单介绍 curl是Linux下一个很强大的http命令行工具,其功能十分强大。 1) 二话不说,先从这里开始吧! $ curl http://www.linuxidc.com 回车之后,www.linuxidc.com 的html就稀里哗啦地显示在屏幕上了 ~ 2) 嗯,要想把读过来页面存下来,是不是要这样呢? $ curl http://www.linuxidc.com > page.html 当然可...

by xinyv - Linux文档专区 - 2008-11-17 21:35:16 阅读(942) 回复(0)

linux下写shell脚本程序 经常会遇到需要post提交东西的时候 这时候用curl是非常方便的 我举一个例子: curl -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" \ -e "http://www.xxx.com/poll.shtml" \ -d "2880[]=105&pid=2880&p=最佳&count=1&receipt=1&poll=投票" \ http://survey.xxx.com/poll/poll.php 这里 -A "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 的意思就是申明自己用的是windows2000下的ie6的...

by yannankai - Linux文档专区 - 2006-04-30 15:16:53 阅读(615) 回复(0)

[code]#!/bin/sh hot_line=4006019977 cno_num_sub=2000 ccic_ip=xxx.xx.xxx.xx record_num_sub=1 curl -A "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" -o output_AgentLogin.htm -D cookie_AgentLogin.txt "http://xxx.xx.xxx.xx/system%21getLoginSecurityCodeImage.action" curl -A "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" -b cookie_AgentLogin.txt "http://xxx.xx.xxx....

by haofang666777 - Shell - 2013-11-08 19:45:36 阅读(3168) 回复(9)

本帖最后由 luwenju 于 2012-05-06 10:35 编辑 有这样一个问题: 比如用浏览器访问一个图片连接 http://192.168.1.100/test.jpg 时可正常显示图片,但是使用curl -I http://192.168.1.100/test.jpg 时获取的状态码是404,而不是200,什么问题?

by luwenju - Linux系统管理 - 2012-05-07 11:17:15 阅读(1018) 回复(1)

curl post数据到一个网站 但是 有像这样的

by lkk2003rty - Shell - 2010-11-12 21:00:54 阅读(1830) 回复(6)

想熟悉一下curl,怎么搞也搞不明白,有没有人帮下忙,把下面这个函数改成用curl实现。 function translate($content){ $argv = array('text'=>$content, 'hl'=>'zh-CN', 'langpair'=>'zh-CN|en', 'ie'=>'UTF-8'); $params = http_build_query($argv); $length = strlen($params); $fp = fsockopen("www.google.com",80,$errno,$errstr,10) or exit($errstr.":".$errno); $header = "POST /translate...

by SeriousCool - PHP - 2009-11-05 23:01:10 阅读(1738) 回复(3)

功能强大的curl 1) 通过curl直接访问sina网站curl http://www.sina.com.cn 2) 你也可以把sina保存期来curl http://www.sina.com > sina 或 curl -o sina http://www.sina.com.cn 3) 同时可以通过代理来访问网页curl -x 10.54.38.18:8080 -o sina.html http://www.sina.com.cn 4) 可以把cookies存放到一个文件里curl -x 10.54.38.18:8080 -o sina.html -D cookie002.txt http://www.sina.com.cn 5) 下一次访问的时候,如何...

by xinshuow - Linux文档专区 - 2009-03-27 15:16:22 阅读(824) 回复(0)