📜  curl multi exec 获取索引 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:52.040000             🧑  作者: Mango

代码示例1
/*when using curl multi exec you may need to pass some data about the request
and retrieve that data whenever the request is done processing you can
use curl's private data feature like so to achieve this:*/
curl_setopt($curl_handle, CURLOPT_PRIVATE, $someIndex);

//.... then later
$info = curl_multi_info_read($handle);//read the info
$someIndex = curl_getinfo($info['handle'], CURLINFO_PRIVATE);