码迷,mamicode.com
首页 > Web开发 > 详细

curl 传递用户session

时间:2016-12-21 13:49:11      阅读:250      评论:0      收藏:0      [点我收藏+]

标签: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";

curl 传递用户session

标签:url   timeout   用户   传递   active   ssi   sid   exec   out   

原文地址:http://www.cnblogs.com/yangyuqiu/p/6207311.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!