有关fdset和知识可以参考:http://idcnews.net/html/edu/linux/20080101/282279.html 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/68521/showart_973003.html
by chinagdszvv - Linux文档专区 - 2008-06-12 15:22:05 阅读(546) 回复(0)
php的curl_multi_info_read函数,在php 5.2之前是不能用的。 我发现现在的版本(5.2.8)不光能用,而且远没那么麻烦, 官方文档说: [quote]Warning The data the returned resource points to will not survive calling curl_multi_remove_handle(). [/quote] 经过简单测试,发现 其实返回值数组"handle"键内的curl handle和外界传递进去的curl handle 全等(===), 不需要做其他特殊处理,可以直接调用curl_multi_remove_hand...
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 ...
今天看到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 当然可...
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的...
[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....
本帖最后由 luwenju 于 2012-05-06 10:35 编辑 有这样一个问题: 比如用浏览器访问一个图片连接 http://192.168.1.100/test.jpg 时可正常显示图片,但是使用curl -I http://192.168.1.100/test.jpg 时获取的状态码是404,而不是200,什么问题?
用curl post数据到一个网站 但是 有像这样的
想熟悉一下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...
功能强大的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) 下一次访问的时候,如何...
功能强大的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) 下一次访问的时候,...