标签:url timeout 用户 传递 active ssi sid exec out
$cmh = curl_multi_init();
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_COOKIE, ‘PHPSESSID=‘ . $_COOKIE[‘PHPSESSID‘]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_TIMEOUT, 1);
curl_multi_add_handle($cmh, $ch);
curl_multi_exec($cmh, $active);
echo "-------------End---------------\n";
/*
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_COOKIE, ‘PHPSESSID=‘ . $_COOKIE[‘PHPSESSID‘]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_TIMEOUT, 1);
curl_exec($ch);
curl_close($ch);
echo "ss";
标签:url timeout 用户 传递 active ssi sid exec out
原文地址:http://www.cnblogs.com/yangyuqiu/p/6207311.html