curl 传递用户session

$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";

上一篇:Electron的代码调试


下一篇:jQuery.unique引发一个血案