php使用curl抓取qq空间的访客信息示例(11)

protected function getLoginJs()
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => 'http://imgcache.qq.com/ptlogin/ver/10067/js/c_login_old.js',
            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:imgcache.qq.com',
                'Connection:keep-alive',)
        );

return ResultExtract::getLoginJsInfo($this->requestExec($options));
    }

public function checkVC($regmaster, $appid, $js_ver, $js_type, $login_sig, $u1, $r)
    {

$options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => 'http://check.ptlogin2.qq.com/check?' . http_build_query(array(
                'regmaster' => $regmaster,
                'uin' => $this->user,
                'appid' => $appid,
                'js_ver' => $js_ver,
                'js_type' => $js_type,
                'login_sig' => $login_sig,
                'u1' => $u1,
                'r' => $r,
            )),
            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:check.ptlogin2.qq.com',
                'Accept-Language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3',
                'Connection:keep-alive',
            )
        );

return ResultExtract::checkVC($this->requestExec($options));
    }

protected function report()
    {
        $url = 'http://ui.ptlogin2.qq.com/cgi-bin/report?id=358342&t=' . Utils::jsRandom();

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6a3b396fe61b016e0da9eb2453f6669b.html