curl_setopt($curl, CURLOPT_COOKIE, $curlCookie);
//运行cURL,请求网页
$string = curl_exec($curl);
//$this->debug($string);
//关闭URL请求
curl_close($curl);
$curl = curl_init();
// 设置您需要抓取的URL
$str = 'http://r.qzone.qq.com/cgi-bin/tfriend/cgi_like_check_and_getfansnum.cgi?uin=706290235&mask=1';
//$this->debug($str);
curl_setopt($curl, CURLOPT_URL, $str);
// 设置header
//curl_setopt($curl, CURLOPT_HEADER, 1);
// 设置cURL参数,要求结果保存到字符串中还是输出到屏幕上
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$timeout = 5;
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
$curlCookie = "uin={$_COOKIE['uin']}; skey={$_COOKIE['skey']}";
//运行cURL,请求网页
$string = curl_exec($curl);
//$this->debug($string);
//关闭URL请求
curl_close($curl);
$curl = curl_init();
// 设置您需要抓取的URL
$str = 'http://r.qzone.qq.com/cgi-bin/tfriend/cgi_like_check_and_getfansnum.cgi?uin=706290235&mask=1';
//$this->debug($str);
curl_setopt($curl, CURLOPT_URL, $str);
// 设置header
//curl_setopt($curl, CURLOPT_HEADER, 1);
// 设置cURL参数,要求结果保存到字符串中还是输出到屏幕上
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$timeout = 5;
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
$curlCookie = "uin={$_COOKIE['uin']}; skey={$_COOKIE['skey']}";
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/3963/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表