if ($login_result['status']) {
$this->trace('登录成功', 'submitLogin');
$this->trace($login_result, '$login_result====');
$this->loginSuccessRedirect($login_result['value']['url']);
$this->setCookies(array(
'fnc' => array(
'value' => 1, 'path' => 'https://www.jb51.net/', 'domain' => '.qzone.qq.com', 'expires' => '0'
),
));
$enterQzoneInfo = $this->enterQzone($login_result['value']['url'], $login_result['value']['ptsig']);
//log
$this->trace($enterQzoneInfo, '$enterQzoneInfo===');
if ($enterQzoneInfo) {
$this->trace('进入空间', 'enterQzone');
//$referer = $login_result['value']['url'];
//$scope = 0;
//log
$this->trace('', 'getCoreJs');
$coreJsInfo = $this->getCoreJs();
$this->trace($coreJsInfo, 'getCoreJs===');
$this->setCookies(array(
'qzone_referer' => array(
'value' => $login_result['value']['url'], 'path' => 'https://www.jb51.net/', 'domain' => '.local.cckf123456789.com', 'expires' => '0'
),
'qzone_visitor_param' => array(
'value' => implode('|', array_values($coreJsInfo['visitor'])), 'path' => 'https://www.jb51.net/', 'domain' => '.local.cckf123456789.com', 'expires' => '0'
),
));
//log
//$this->trace('', 'rightFrameVisitor');
//print_r($this->rightFrameVisitor($referer, implode('|', array_values($coreJsInfo['visitor']))));
return $this->success();
} else {
$this->error('err-006');
}
} else {
$this->error('err-005');
}
}
protected function visitQzone()
{
$options = array(
CURLOPT_TIMEOUT => $this->request_timeout,
CURLOPT_HEADER => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://qzone.qq.com',
CURLOPT_HTTPHEADER => array(
'Referer:?proxy_url=http%3A//qzs.qq.com/qzone/v6/portal/proxy.html&daid=5&pt_qzone_sig=1&hide_title_bar=1&low_login=0&qlogin_auto_login=1&no_verifyimg=1&link_target=blank&appid=549000912&style=22&target=self&s_url=http%3A//qzs.qq.com/qzone/v5/loginsucc.html?para=izone&pt_qr_app=%E6%89%8B%E6%9C%BAQQ%E7%A9%BA%E9%97%B4&pt_qr_link=http%3A//z.qzone.com/download.html&self_regurl=http%3A//qzs.qq.com/qzone/v6/reg/index.html&pt_qr_help_link=http%3A//z.qzone.com/download.html',
'User-Agent:' . $this->user_agent,
'Host:qzone.qq.com',
'Accept-Language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3',
'Connection:keep-alive',)
);
return ResultExtract::getLoginAddress($this->requestExec($options));
}