我可以在curl连接上创建多个请求吗? [英] Can I make more then one request on a curl connection?
问题描述
在PHP(v5)中,有没有办法在打开的curl连接上发出多个请求?
我注意到我的大瓶颈是超时/连接的断开它的自我(我正在做很多小数据请求,很快完成),所以我想能够做一些像打开
init curl连接,
设置url / params,请求,获取结果
设置url / params,请求,获取结果
关闭curl
我不知道这是否可能。
可能是 curl_multi _ *
函数是您要查找的。 p>
In PHP (v5), is there a way to make multiple requests on an open curl connection?
I'm noticing that my big bottleneck is the timeout/teardown of the connection its self (i'm making lots of small data requests that finish quickly), so I would like to be able to do something like open
init curl connection,
set url/params, do request, get results set url/params, do request, get results
close curl
I just dont know if this is possible at all.
Probably the curl_multi_*
functions are what you are looking for.
这篇关于我可以在curl连接上创建多个请求吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!