首頁 php教程 PHP源码 php使用curl抓取qq空间的访客信息示例_php技巧

php使用curl抓取qq空间的访客信息示例_php技巧

May 25, 2016 pm 04:59 PM
qq空間

这篇文章主要介绍了php使用curl抓取qq空间的访客信息示例,需要的朋友可以参考下

config.php

<?php
define(&#39;APP_DIR&#39;, dirname(__FILE__));
define(&#39;COOKIE_FILE&#39;, APP_DIR . &#39;/app.cookie.txt&#39;); //会话记录文件
define(&#39;VISITOR_CAPTURE_INTERVAL&#39;, 3); //QQ采集间隔
define(&#39;VISITOR_DATA_UPLOAD_INTERVAL&#39;, &#39;&#39;);
define(&#39;THIS_TIME&#39;, time());
define(&#39;REQUEST_TIMEOUT&#39;, 20); //请求超时20秒
define(&#39;END_LINE&#39;, "\n");
define(&#39;DEBUG&#39;, true); //开启调试
$login_users = array(
    array(&#39;user&#39; => &#39;2064556526&#39;, &#39;password&#39; => &#39;909124951&#39;),
    array(&#39;user&#39; => &#39;483258700&#39;, &#39;password&#39; => &#39;909124951&#39;),
    array(&#39;user&#39; => &#39;1990270522&#39;, &#39;password&#39; => &#39;909124951&#39;),
    array(&#39;user&#39; => &#39;2718711637&#39;, &#39;password&#39; => &#39;909124951&#39;),
    array(&#39;user&#39; => &#39;2841076562&#39;, &#39;password&#39; => &#39;909124951&#39;),
);
登入後複製

qy.visitor.php

<?php
include(&#39;./config.php&#39;);
include(APP_DIR . &#39;/qy.visitor.php&#39;);
$sessions = array();
$user = $login_users[array_rand($login_users)];
$visitor_capture = new QQVisitorCapture($user[&#39;user&#39;], $user[&#39;password&#39;], COOKIE_FILE, REQUEST_TIMEOUT, DEBUG, END_LINE);
$visitors = $visitor_capture->getVisitorInfo();
if (empty($visitors)) {
    $this->clearCookies(true);
} else {
    $cckf_service = new CCKFService(SECURITY_KEY,SERVICE_ID,SERVICE_ADDRESS,&#39;&#39;, REQUEST_TIMEOUT, DEBUG, END_LINE);
}
qy.class.php
<?php
class Trace
{
    public static function nl($num = 1)
    {
        $str = &#39;&#39;;
        for ($i = 0; $i < $num; $i++) {
            $str .= "\n";
        }
        return $str;
    }
    public static function br($num = 1)
    {
        $str = &#39;&#39;;
        for ($i = 0; $i < $num; $i++) {
            $str .= "<br/>";
        }
        return $str;
    }
    public static function write($content, $end_line, $title = null)
    {
        $close = &#39;^^^^^^^^^^^^^^^^^&#39;;
        if ($title) {
            $start = &#39;--------&#39; . $title . &#39;---------&#39;;
        } else {
            $start = &#39;-----------------&#39;;
        }
        echo $start . $end_line;
        if (is_array($content)) {
            print_r($content);
            echo $end_line;
        } else {
            echo $content;
            echo $end_line;
        }
        if (empty($content)) {
            echo $end_line;
        } else {
            echo $close . $end_line;
        }
    }
}
class Utils
{
    public static function getMicroTime()
    {
        list($mic, $time) = explode(" ", microtime());
        return intval($time) + floatval(sprintf(&#39;%.3f&#39;, $mic));
    }
    public static function getUTCMilliseconds()
    {
        return round(rand(1, 9) / 10 * 2147483647) * round(1, 999) % 10000000000;
    }
    public static function decodeURIComponent($content)
    {
        return urldecode(preg_replace("/\\\\x([0-9a-z]{2,3})/i", "%$1", $content));
    }
    public static function  jsRandom()
    {
        list($mic, $time) = explode(" ", microtime());
        return $mic;
    }
    function loginJsTime()
    {
        list($mic, $time) = explode(" ", microtime());
        return $time . sprintf(&#39;%3d&#39;, $mic * 1000);
    }
    protected static function utf8_unicode($c)
    {
        switch (strlen($c)) {
            case 1:
                return ord($c);
            case 2:
                $n = (ord($c[0]) & 0x3f) << 6;
                $n += ord($c[1]) & 0x3f;
                return $n;
            case 3:
                $n = (ord($c[0]) & 0x1f) << 12;
                $n += (ord($c[1]) & 0x3f) << 6;
                $n += ord($c[2]) & 0x3f;
                return $n;
            case 4:
                $n = (ord($c[0]) & 0x0f) << 18;
                $n += (ord($c[1]) & 0x3f) << 12;
                $n += (ord($c[2]) & 0x3f) << 6;
                $n += ord($c[3]) & 0x3f;
                return $n;
        }
    }
    public static function  getGTK($str)
    {
        $hash = 5381;
        for ($i = 0, $len = strlen($str); $i < $len; ++$i) {
            $hash += ($hash << 5) + self::utf8_unicode($str[$i]);
        }
        return $hash & 2147483647;
    }
    protected static function hexchar2bin($str)
    {
        $arr = &#39;&#39;;
        $temp = null;
        for ($i = 0; $i < strlen($str); $i = $i + 2) {
            $arr .= "\\x" . substr($str, $i, 2);
        }
        eval(&#39;$temp="&#39; . $arr . &#39;";&#39;);
        return $temp;
    }
    protected static function getUid($uid)
    {
        $temp = null;
        eval(&#39;$temp="&#39; . $uid . &#39;";&#39;);
        return $temp;
    }
    public static function getEncryption($password, $uin, $vcode)
    {
        $uin = self::getUid($uin);
        $str1 = self::hexchar2bin(strtoupper(md5($password)));
        $str2 = strtoupper(md5($str1 . $uin));
        return strtoupper(md5($str2 . strtoupper($vcode)));
    }
}
class CookieFileExtract
{
    protected $cookie_file;
    protected $cookie_list;
    protected function  __construct($cookie_file)
    {
        $this->cookie_file = $cookie_file;
        $this->cookie_list = $this->extractFile();
    }
    protected function isValidateCookieFile()
    {
        if ($this->cookie_file && file_exists($this->cookie_file)) {
            return true;
        } else {
            return false;
        }
    }
    protected function extractFile()
    {
        $cookie_list = array();
        if ($this->isValidateCookieFile($this->cookie_file)) {
            $content = file($this->cookie_file);
            if (is_array($content)) {
                foreach ($content as $line) {
                    $line = trim($line);
                    if (strlen($line) > 0 && $line[0] != &#39;#&#39;) {
                        $cookie = (preg_split("/\s+/", $line));
                        if (count($cookie) == 7) {
                            $cookie_list[$cookie[5]] = $cookie[6];
                        } else {
                            $cookie_list[$cookie[5]] = &#39;&#39;;
                        }
                    }
                }
            }
        }
        return $cookie_list;
    }
    protected function buildCookieStr($cookies)
    {
        $arr = array();
        if (is_array($cookies)) {
            foreach ($cookies as $k => $cookie) {
                $line = $cookie[&#39;domain&#39;] . "\t" . "TRUE" . "\t" . $cookie[&#39;path&#39;] . "\t" . "FALSE" . "\t" . $cookie[&#39;expires&#39;] . "\t" . $k . "\t" . $cookie[&#39;value&#39;];
                $arr[] = $line;
            }
        }
        return $arr;
    }
    protected function __setCookies($cookies)
    {
        $new_line = array();
        if (is_array($cookies)) {
            if ($this->isValidateCookieFile($this->cookie_file)) {
                $content = file($this->cookie_file);
                if (is_array($content)) {
                    foreach ($content as $line) {
                        $line = trim($line);
                        if (strlen($line) > 0 && $line[0] != &#39;#&#39;) {
                            $cookie = (preg_split("/\s+/", $line));
                            if (!in_array($cookie[5], $cookies)) {
                                $new_line[] = $line;
                            }
                        } else {
                            $new_line[] = $line;
                        }
                    }
                }
            }
            file_put_contents($this->cookie_file, implode("\n", array_merge($new_line, $this->buildCookieStr($cookies))));
        }
    }
    protected function __getAllCookies($refresh = false)
    {
        if ($refresh) {
            $this->cookie_list = $this->extractFile();
        }
        return $this->cookie_list;
    }
    protected function __getCookie($cookie_name, $refresh = false)
    {
        $cookie_list = $this->__getAllCookies($refresh);
        if (is_array($cookie_list) && array_key_exists($cookie_name, $cookie_list)) {
            return $cookie_list[$cookie_name];
        } else {
            return null;
        }
    }
    protected function __clearAllCookies()
    {
        $this->cookie_list = null;
        @unlink($this->cookie_file);
    }
}
class BaseRequest extends CookieFileExtract
{
    protected $curl_instance;
    protected $request_timeout;
    protected $debug;
    protected $end_line;
    protected $user_agent = &#39;Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0&#39;;
    protected function __construct($cookie_file, $request_timeout, $debug, $end_line)
    {
        parent::__construct($cookie_file);
        $this->request_timeout = $request_timeout;
        $this->debug = $debug;
        $this->end_line = $end_line;
        $this->initInstance();
    }
    protected function initInstance()
    {
        $this->curl_instance = curl_init();
        if ($this->isValidateCookieFile()) {
            curl_setopt($this->curl_instance, CURLOPT_COOKIEJAR, $this->cookie_file);
            curl_setopt($this->curl_instance, CURLOPT_COOKIEFILE, $this->cookie_file);
        }
        curl_setopt($this->curl_instance, CURLOPT_TIMEOUT, $this->request_timeout);
        curl_setopt($this->curl_instance, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($this->curl_instance, CURLOPT_HEADER, 1);
        curl_setopt($this->curl_instance, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($this->curl_instance, CURLOPT_SSL_VERIFYHOST, 0);
        curl_exec($this->curl_instance);
    }
    function setCookies($cookies)
    {
        $this->closeInstance();
        $this->__setCookies($cookies);
        $this->initInstance();
    }
    protected function getAllCookies($refresh = false)
    {
        $this->closeInstance();
        $cookies = $this->__getAllCookies($refresh);
        $this->initInstance();
        return $cookies;
    }
    protected function clearAllCookies($refresh = false)
    {
        $this->closeInstance();
        $this->__clearAllCookies();
        if ($refresh) {
            $this->initInstance();
        }
    }
    protected function getCookie($name, $refresh = false)
    {
        $this->closeInstance();
        $cookie = $this->__getCookie($name, $refresh);
        $this->initInstance();
        return $cookie;
    }
    protected function getRequestInstance()
    {
        return $this->curl_instance;
    }
    protected function closeInstance()
    {
        if (is_resource($this->curl_instance)) {
            curl_close($this->curl_instance);
        }
    }
    protected function resetInstance()
    {
        $this->closeInstance();
        @unlink($this->cookie_file);
        $this->initInstance();
    }
    protected function requestExec($option)
    {
        curl_setopt_array($this->getRequestInstance(), $option);
        //if ($this->debug) {
        //    $result = curl_exec($this->getRequestInstance());
        //    Trace::write($result, $this->end_line, &#39;request output&#39;);
        //} else {
        return curl_exec($this->getRequestInstance());
        //}
    }
}
class QQVisitorRequest extends BaseRequest
{
    protected $user;
    protected $password;
    protected function __construct($user, $password, $cookie_file, $request_timeout, $debug, $end_line)
    {
        parent::__construct(dirname($cookie_file) . &#39;/&#39; . $user . &#39;.&#39; . basename($cookie_file), $request_timeout, $debug, $end_line);
        $this->user = $user;
        $this->password = $password;
    }
}
class ResultExtract
{
    public static function  getCoreJsInfo($content, $user)
    {
        $arr = array();
        preg_match(&#39;/cfg\s*=\s*\{(.*?)\s*\}\s*,\s*URL_PARAM_HASH/s&#39;, $content, $m);
        if (count($m) > 0) {
            $f = preg_replace(&#39;/\s*/&#39;, &#39;&#39;, $m[1]);
            $f = preg_replace(&#39;/"\+g\_iLoginUin\+"/&#39;, $user, $f);
            $f = preg_replace(&#39;/\$j\.cookie.get\("hotfeeds_closed"\)==1\?""\:/&#39;, &#39;&#39;, $f);
            $f = explode(",", $f);
            if (count($f) > 0) {
                foreach ($f as $t) {
                    $t = trim($t);
                    $p = strpos($t, &#39;:&#39;);
                    $key = trim(substr($t, 0, $p), &#39;"&#39;);
                    $value = trim(substr($t, $p + 1), &#39;"&#39;);
                    if ($key) {
                        $arr[$key] = $value;
                    }
                }
                if (count($arr) > 0) {
                    $arr[&#39;visitor&#39;] = $arr;
                }
            }
        }
        return $arr;
    }
    public static function  enterQzoneSuccess($content)
    {
        $arr = array();
        $arr2 = array();
        preg_match(&#39;/g_Data\s*=\s*{\s*feedsPart1\s*:\s*(.*?)\s*,\s*feedsPart2/s&#39;, $content, $m);
        if (count($m) > 0) {
            $f = preg_replace(&#39;/\s*/&#39;, &#39;&#39;, $m[1]);
            $f = preg_replace(&#39;/([\{,])([^,]*?)(\:)/&#39;, &#39;$1"$2"$3&#39;, $f);
            $f = preg_replace(&#39;/:\&#39;(.*?)\&#39;([,\}])/&#39;, &#39;:"$1"$2&#39;, $f);
            $arr = json_decode($f, true);
            $arr = $arr[&#39;main&#39;];
        }
        preg_match(&#39;/g_type.*?g_IZone_Flag/s&#39;, $content, $m);
        if (count($m) > 0) {
            $f = preg_replace(&#39;/\s*/&#39;, &#39;&#39;, $m[0]);
            $f = explode(",", $f);
            foreach ($f as $t) {
                $t = trim($t);
                $p = strpos($t, &#39;=&#39;);
                $key = trim(substr($t, 0, $p));
                $value = trim(substr($t, $p + 1), &#39;"&#39;);
                if ($key) {
                    $arr2[$key] = $value;
                }
            }
        }
        return array_merge($arr, $arr2);
    }
    public static function getLoginJsInfo($content)
    {
        $s = preg_replace(&#39;/.*?pt\.plogin\s*=\s*\{(.*?)aqScanLink.*/s&#39;, &#39;$1&#39;, $content);
        preg_match(&#39;/.*js_type\s*:\s*(\d+)\s*,.*/&#39;, $s, $m);
        if (count($m) > 1) {
            return array(&#39;js_type&#39; => $m[1]);
        }
        return array();
    }
    public static function getLoginAddress($content)
    {
        preg_match(&#39;/.*?<\s*iframe\s*id\s*=\s*"login_frame"\s*name\s*=\s*"login_frame".*?src\s*=\s*"(.*?xui\.ptlogin2\.qq\.com.*?)".*?>\s*<\/iframe>.*?/&#39;, $content, $m);
        if (count($m) > 1) {
            return html_entity_decode($m[1]);
        }
        return null;
    }
    public static function checkLoginSuccess($content)
    {
        preg_match_all(&#39;/.*?\((.*)\).*?/&#39;, $content, $match);
        if ($match[1][0]) {
            $g = explode(&#39;,&#39;, $match[1][0]);
            if (count($g) > 1) {
                if (($g[count($g) - 2]) == "&#39;登录成功!&#39;") {
                    $url_parts = parse_url($g[2]);
                    parse_str($url_parts[&#39;query&#39;], $arr);
                    if (array_key_exists(&#39;ptsig&#39;, $arr)) {
                        $ptsig = $arr[&#39;ptsig&#39;];
                    } else {
                        $ptsig = null;
                    }
                    return array(&#39;status&#39; => true, &#39;value&#39; => array(&#39;url&#39; => $g[2], &#39;ptsig&#39; => $ptsig));
                }
            }
        }
        return array(&#39;status&#39; => false);
    }
    public static function rightFrameVisitors($content)
    {
        $visitor_list = array();
        $f = preg_replace(&#39;/\s*/&#39;, &#39;&#39;, $content);
        $f = preg_replace(&#39;/.*?_Callback\((\{.*?\})\).*?/&#39;, &#39;$1&#39;, $f);
        $f = json_decode($f, true);
        if (is_array($f) && count($f) > 0 && array_key_exists(&#39;data&#39;, $f)
            && array_key_exists(&#39;module_3&#39;, $f[&#39;data&#39;])
            && array_key_exists(&#39;data&#39;, $f[&#39;data&#39;][&#39;module_3&#39;])
            && array_key_exists(&#39;items&#39;, $f[&#39;data&#39;][&#39;module_3&#39;][&#39;data&#39;])
        ) {
            $visitors = $f[&#39;data&#39;][&#39;module_3&#39;][&#39;data&#39;][&#39;items&#39;];
            foreach ($visitors as $visitor) {
                if (!array_key_exists(&#39;loc&#39;, $visitor)) {
                    $visitor_list [] = array(
                        &#39;uin&#39; => $visitor[&#39;uin&#39;], &#39;name&#39; => $visitor[&#39;name&#39;], &#39;online&#39; => $visitor[&#39;online&#39;], &#39;time&#39; => $visitor[&#39;time&#39;],
                        &#39;img&#39; => $visitor[&#39;img&#39;], &#39;yellow&#39; => $visitor[&#39;yellow&#39;], &#39;supervip&#39; => $visitor[&#39;supervip&#39;],
                    );
                }
            }
        }
        return $visitor_list;
    }
    public static function getVisitors($content)
    {
        $f = preg_replace(&#39;/\s*/&#39;, &#39;&#39;, $content);
        preg_match(&#39;/^.*?(\{.*?\})\);\s*$/&#39;, $f, $m);
        $visitor_list = array();
        if (is_array($m) && count($m) > 1 && strlen($m[1]) > 0) {
            $visitors = json_decode(trim($m[1]), true);
            if (array_key_exists(&#39;data&#39;, $visitors) && array_key_exists(&#39;items&#39;, $visitors[&#39;data&#39;])) {
                foreach ($visitors[&#39;data&#39;][&#39;items&#39;] as $visitor) {
                    if ($visitor[&#39;name&#39;]) {
                        $_ = array(
                            &#39;uin&#39; => $visitor[&#39;uin&#39;], &#39;name&#39; => $visitor[&#39;name&#39;], &#39;time&#39; => $visitor[&#39;time&#39;],
                            &#39;yellow&#39; => $visitor[&#39;yellow&#39;], &#39;supervip&#39; => $visitor[&#39;supervip&#39;],
                        );
                        if (array_key_exists(&#39;portraitlabel&#39;, $visitor)) {
                            $_[&#39;portraitlabel&#39;] = $visitor[&#39;portraitlabel&#39;];
                        }
                        $visitor_list[] = $_;
                        if (array_key_exists(&#39;uins&#39;, $visitor)) {
                            foreach ($visitor[&#39;uins&#39;] as $uins) {
                                $_ = array(
                                    &#39;uin&#39; => $uins[&#39;uin&#39;], &#39;name&#39; => $uins[&#39;name&#39;], &#39;time&#39; => $uins[&#39;time&#39;],
                                    &#39;yellow&#39; => $uins[&#39;yellow&#39;], &#39;supervip&#39; => $uins[&#39;supervip&#39;],
                                );
                                if (array_key_exists(&#39;portraitlabel&#39;, $uins)) {
                                    $_[&#39;portraitlabel&#39;] = $uins[&#39;portraitlabel&#39;];
                                }
                                $visitor_list[] = $_;
                            }
                        }
                    }
                }
            }
        }
        return $visitor_list;
    }
    public static function  checkVC($content)
    {
        preg_match_all(&#39;/.*?\((.*)\).*?/&#39;, $content, $match);
        if (strlen($match[1][0]) > 1) {
            $m = str_replace("&#39;", &#39;&#39;, $match[1][0]);
            $g = explode(&#39;,&#39;, $m);
            if (count($g) == 3) {
                return array(&#39;saltUin&#39; => $g[2], &#39;verifycode&#39; => $g[1], &#39;RSAKey&#39; => $g[2] ? false : true);
            }
        }
        return array();
    }
    public static function getLoginInfo($content)
    {
        $s = preg_replace(&#39;/.*?pt\.ptui\s*=\s*\{(.*?)\}\s*;.*/s&#39;, &#39;$1&#39;, $content);
        $e = preg_split(&#39;/,\s*/&#39;, trim($s));
        $info = array();
        foreach ($e as $t) {
            $t = trim($t);
            $p = strpos($t, &#39;:&#39;);
            $key = trim(substr($t, 0, $p));
            $value = trim(substr($t, $p + 1));
            if (preg_match(&#39;/encodeURIComponent/&#39;, $value)) {
                $value = preg_replace(&#39;/^encodeURIComponent\s*\(\s*"(.*)?"\s*\)\s*,?$/&#39;, &#39;$1&#39;, $value);
            } else {
                $value = trim($value, &#39;",&#39;);
            }
            if ($key) {
                $info[$key] = urldecode($value);
            }
        }
        return $info;
    }
}
class QQVisitorCapture extends QQVisitorRequest
{
    public function __construct($user, $password, $cookie_file, $request_timeout, $debug, $end_line)
    {
        parent:: __construct($user, $password, $cookie_file, $request_timeout, $debug, $end_line);
    }
    public function trace($content, $title)
    {
        if ($this->debug = true) {
            Trace:: write($content, $this->end_line, $title);
        }
    }
    public function error($message)
    {
        $this->trace($message, &#39;login error &#39;);
        return false;
    }
    public function success()
    {
        return true;
    }
    public function getGTKEncryption()
    {
        return Utils ::getGTK($this->getCookie(&#39;skey&#39;, true));
    }
    public function getCookies($refresh = false)
    {
        return $this->getAllCookies($refresh);
    }
    public function clearCookies($refresh = false)
    {
        return $this->clearAllCookies($refresh);
    }
    public function login()
    {
        $login_submit_info_url = null;
        $login_submit_info_url = $this->visitQzone();
        $this->setCookies(array(
            &#39;pgv_pvid&#39; => array(
                &#39;value&#39; => Utils::getUTCMilliseconds(), &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.qq.com&#39;, &#39;expires&#39; => &#39;0&#39;
            ),
            &#39;pgv_info&#39; => array(
                &#39;value&#39; => &#39;ssid=s&#39; . Utils::getUTCMilliseconds(), &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.qq.com&#39;, &#39;expires&#39; => &#39;0&#39;
            ),
            &#39;_qz_referrer&#39; => array(
                &#39;value&#39; => &#39;qzone.qq.com&#39;, &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.qq.com&#39;, &#39;expires&#39; => &#39;0&#39;
            ),
        ));
        //log
        $this->trace(&#39;&#39;, &#39;login begin&#39;);
        //log
        $this->trace($login_submit_info_url, &#39;$login_submit_info_url===&#39;);
        $login_submit_info = $this->getLoginSubmitInfo($login_submit_info_url);
        //log
        $this->trace($login_submit_info, &#39;$login_submit_info===&#39;);
        if (empty($login_submit_info)) {
            $this->error(&#39;err-001&#39;);
        }
        $this->report();
        //log
        $this->trace(&#39;&#39;, &#39;getLoginJs&#39;);
        $js_arr = $this->getLoginJs();
        //log
        $this->trace($js_arr, &#39;$getLoginJs===&#39;);
        if (empty($js_arr)) {
            $this->error(&#39;err-002&#39;);
        }
        $u = $uin = $this->user;
        $r = Utils::jsRandom();
        $verifycode = null;
        $pt_rsa = null;
        $ptredirect = $login_submit_info[&#39;target&#39;];
        $h = $t = $g = $from_ui = 1;
        $p = null;
        $regmaster = $login_submit_info[&#39;regmaster&#39;];
        $u1 = Utils::decodeURIComponent($login_submit_info[&#39;s_url&#39;]);
        $ptlang = $login_submit_info[&#39;lang&#39;];
        $action = strval(rand(5, 9)) . &#39;-&#39; . strval(strlen($this->user) + strlen($this->password) + rand(1, 5)) . &#39;-&#39; . Utils::loginJsTime();
        $js_ver = $login_submit_info[&#39;ptui_version&#39;];
        $js_type = $js_arr[&#39;js_type&#39;];
        $login_sig = $login_submit_info[&#39;login_sig&#39;];
        $appid = $aid = $login_submit_info[&#39;appid&#39;];
        $pt_qzone_sig = $login_submit_info[&#39;pt_qzone_sig&#39;];
        $daid = $login_submit_info[&#39;daid&#39;];
        //log
        $this->trace(&#39;&#39;, &#39;checkVC&#39;);
        $check_data = $this->checkVC($regmaster, $appid, $js_ver, $js_type, $login_sig, $u1, $r);
        if (count($check_data) !== 3) {
            $this->error(&#39;err-003&#39;);
        }
        //log
        $this->trace($check_data, &#39;$check_data===&#39;);
        //log
        $this->trace(json_encode($check_data), &#39;$check_data===&#39;);
        $verifycode = $check_data[&#39;verifycode&#39;];
        if ($check_data[&#39;RSAKey&#39;]) {
            $this->error(&#39;err-004&#39;);
        } else {
            $p = Utils::getEncryption($this->password, $check_data[&#39;saltUin&#39;], $verifycode);
            $pt_rsa = 0;
        }
        //log
        $this->trace(&#39;&#39;, &#39;submitLogin&#39;);
        $this->setCookies(array(
            &#39;ptui_loginuin&#39; => array(
                &#39;value&#39; => $this->user, &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.qq.com&#39;, &#39;expires&#39; => &#39;0&#39;
            ),
        ));
        $login_result = $this->submitLogin($verifycode, $p,
            $pt_rsa, $ptredirect, $u1,
            $h, $t, $g, $from_ui,
            $ptlang, $action, $js_ver, $js_type,
            $login_sig, $aid, $daid, $pt_qzone_sig);
        if ($login_result[&#39;status&#39;]) {
            $this->trace(&#39;登录成功&#39;, &#39;submitLogin&#39;);
            $this->trace($login_result, &#39;$login_result====&#39;);
            $this->loginSuccessRedirect($login_result[&#39;value&#39;][&#39;url&#39;]);
            $this->setCookies(array(
                &#39;fnc&#39; => array(
                    &#39;value&#39; => 1, &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.qzone.qq.com&#39;, &#39;expires&#39; => &#39;0&#39;
                ),
            ));
            $enterQzoneInfo = $this->enterQzone($login_result[&#39;value&#39;][&#39;url&#39;], $login_result[&#39;value&#39;][&#39;ptsig&#39;]);
            //log
            $this->trace($enterQzoneInfo, &#39;$enterQzoneInfo===&#39;);
            if ($enterQzoneInfo) {
                $this->trace(&#39;进入空间&#39;, &#39;enterQzone&#39;);
                //$referer = $login_result[&#39;value&#39;][&#39;url&#39;];
                //$scope = 0;
                //log
                $this->trace(&#39;&#39;, &#39;getCoreJs&#39;);
                $coreJsInfo = $this->getCoreJs();
                $this->trace($coreJsInfo, &#39;getCoreJs===&#39;);
                $this->setCookies(array(
                    &#39;qzone_referer&#39; => array(
                        &#39;value&#39; => $login_result[&#39;value&#39;][&#39;url&#39;], &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.local.cckf123456789.com&#39;, &#39;expires&#39; => &#39;0&#39;
                    ),
                    &#39;qzone_visitor_param&#39; => array(
                        &#39;value&#39; => implode(&#39;|&#39;, array_values($coreJsInfo[&#39;visitor&#39;])), &#39;path&#39; => &#39;/&#39;, &#39;domain&#39; => &#39;.local.cckf123456789.com&#39;, &#39;expires&#39; => &#39;0&#39;
                    ),
                ));
                //log
                //$this->trace(&#39;&#39;, &#39;rightFrameVisitor&#39;);
                //print_r($this->rightFrameVisitor($referer, implode(&#39;|&#39;, array_values($coreJsInfo[&#39;visitor&#39;]))));
                return $this->success();
            } else {
                $this->error(&#39;err-006&#39;);
            }
        } else {
            $this->error(&#39;err-005&#39;);
        }
    }
    protected function visitQzone()
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => &#39;http://qzone.qq.com&#39;,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:qzone.qq.com&#39;,
                &#39;Accept-Language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3&#39;,
                &#39;Connection:keep-alive&#39;,)
        );
        return ResultExtract::getLoginAddress($this->requestExec($options));
    }
    protected function getLoginJs()
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => &#39;http://imgcache.qq.com/ptlogin/ver/10067/js/c_login_old.js&#39;,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:imgcache.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,)
        );
        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 => &#39;http://check.ptlogin2.qq.com/check?&#39; . http_build_query(array(
                &#39;regmaster&#39; => $regmaster,
                &#39;uin&#39; => $this->user,
                &#39;appid&#39; => $appid,
                &#39;js_ver&#39; => $js_ver,
                &#39;js_type&#39; => $js_type,
                &#39;login_sig&#39; => $login_sig,
                &#39;u1&#39; => $u1,
                &#39;r&#39; => $r,
            )),
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:check.ptlogin2.qq.com&#39;,
                &#39;Accept-Language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::checkVC($this->requestExec($options));
    }
    protected function report()
    {
        $url = &#39;http://ui.ptlogin2.qq.com/cgi-bin/report?id=358342&t=&#39; . Utils::jsRandom();
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $url,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:ui.ptlogin2.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,)
        );
        $this->requestExec($options);
    }
    protected function getLoginSubmitInfo($url)
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $url,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:xui.ptlogin2.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::getLoginInfo($this->requestExec($options));
    }
    protected function submitLogin($verifycode, $p,
                                   $pt_rsa, $ptredirect, $u1,
                                   $h, $t, $g, $from_ui,
                                   $ptlang, $action, $js_ver, $js_type,
                                   $login_sig, $aid, $daid, $pt_qzone_sig)
    {
        $url = &#39;http://ptlogin2.qq.com/login&#39;;
        $url .= &#39;?&#39; . http_build_query(array(
                &#39;u&#39; => $this->user,
                &#39;verifycode&#39; => $verifycode));
        $url .= &#39;&p=&#39; . $p; ###
        $url .= &#39;&&#39; . http_build_query(array(
                &#39;pt_rsa&#39; => $pt_rsa,
                &#39;ptredirect&#39; => $ptredirect,
                &#39;u1&#39; => $u1,
                &#39;h&#39; => $h,
                &#39;t&#39; => $t,
                &#39;g&#39; => $g,
                &#39;from_ui&#39; => $from_ui,
                &#39;ptlang&#39; => $ptlang,
                &#39;action&#39; => $action,
                &#39;js_ver&#39; => $js_ver,
                &#39;js_type&#39; => $js_type,
            ));
        $url .= &#39;&login_sig=&#39; . $login_sig; ###
        $url .= &#39;&&#39; . http_build_query(array(
                &#39;aid&#39; => $aid,
                &#39;daid&#39; => $daid,
                &#39;pt_qzone_sig&#39; => $pt_qzone_sig));
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $url,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:ptlogin2.qq.com&#39;,
                &#39;Accept-Language:zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::checkLoginSuccess($this->requestExec($options));
    }
    public function loginSuccessRedirect($url)
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => $url,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:qzs.qq.com&#39;,
                &#39;Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&#39;,
                &#39;Connection:keep-alive&#39;,
                &#39;DNT:1&#39;,
            )
        );
        $this->requestExec($options);
    }
    public function  enterQzone($referer, $ptsig)
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => &#39;http://user.qzone.qq.com/&#39; . $this->user . &#39;?ptsig=&#39; . $ptsig,
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:&#39; . $referer,
                &#39;Host:user.qzone.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::enterQzoneSuccess($this->requestExec($options));
    }
    public function getCoreJs()
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => "http://ctc.qzonestyle.gtimg.cn/c/=/qzone/v8/engine/cpu.js,/qzone/v8/ic/qm.js,/qzone/v8/ic/tab_menu.js,/qzone/v8/ic/feeds.js,/qzone/v8/ic/tab_friend_feed.js,/qzone/v8/toolbar/core.js",
        );
        return ResultExtract::getCoreJsInfo($this->requestExec($options), $this->user);
    }
    public function getVisitorInfo($mask = 7, $page = 1, $fupdate = 1, $clear = 1)
    {
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => &#39;http://g.qzone.qq.com/cgi-bin/friendshow/cgi_get_visitor_more?&#39; . http_build_query(array(
                &#39;uin&#39; => $this->user,
                &#39;mask&#39; => $mask,
                &#39;g_tk&#39; => $this->getGTKEncryption(),
                &#39;page&#39; => $page,
                &#39;fupdate&#39; => $fupdate,
                &#39;clear&#39; => $clear,
                &#39;sd&#39; => Utils::jsRandom(),
            )),
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:http://www.php.cn/&#39;,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:g.qzone.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::getVisitors($this->requestExec($options));
    }
    public function  rightFrameVisitor()
    {
        $param = Utils ::getGTK($this->getCookie(&#39;qzone_visitor_param&#39;, true));
        $referver = Utils ::getGTK($this->getCookie(&#39;qzone_referer&#39;));
        $options = array(
            CURLOPT_TIMEOUT => $this->request_timeout,
            CURLOPT_HEADER => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_URL => &#39;http://r.qzone.qq.com/cgi-bin/right_frame.cgi?&#39; . http_build_query(array(
                &#39;uin&#39; => $this->user,
                &#39;param&#39; => $param,
                &#39;g_tk&#39; => $this->getGTKEncryption(),
            )),
            CURLOPT_HTTPHEADER => array(
                &#39;Referer:&#39; . $referver,
                &#39;User-Agent:&#39; . $this->user_agent,
                &#39;Host:r.qzone.qq.com&#39;,
                &#39;Connection:keep-alive&#39;,
            )
        );
        return ResultExtract::rightFrameVisitors($this->requestExec($options));
    }
}
class CCKFServiceRequest extends BaseRequest
{
    protected $service_address;
    protected $service_id;
    protected $security_key;
    public function __construct($security_key, $service_id, $service_address, $cookie_file, $request_timeout, $debug, $end_line)
    {
        parent:: __construct($cookie_file, $request_timeout, $debug, $end_line);
        $this->service_address = $service_address;
        $this->service_id = $service_id;
        $this->security_key = $security_key;
    }
}
class CCKFService extends BaseRequest
{
    public function __construct($security_key, $service_id, $service_address, $cookie_file, $request_timeout, $debug, $end_line)
    {
        parent:: __construct($security_key, $service_id, $service_address, $cookie_file, $request_timeout, $debug, $end_line);
    }
    public function uploadData($data)
    {
        if (is_array($data) && !empty($data)) {
            $options = array(
                CURLOPT_TIMEOUT => $this->request_timeout,
                CURLOPT_HEADER => 1,
                CURLOPT_RETURNTRANSFER => 1,
                CURLOPT_URL => $this->service_address . &#39;?&#39; . http_build_query(array()),
            );
        }
    }
}
class BaseConfigFileUtils
{
    protected $file;
    public function __construct($file)
    {
        $this->file = $file;
    }
    public function extractFile()
    {
        $f_str = &#39;&#39;;
        $fp = fopen($this->file, &#39;r&#39;);
        if (flock($fp, LOCK_SH)) {
            while (!feof($fp)) {
                $f_str .= fgets($fp);
            }
            flock($fp, LOCK_UN);
        }
        fclose($fp);
        $c = json_decode($f_str, true);
        return is_array($c) ? $c : array();
    }
}
class RunAtTimeConfig extends BaseConfigFileUtils
{
    protected $visitor_capture_interval;
    protected $config;
    public function __construct($file, $visitor_capture_interval)
    {
        parent::__construct($file);
        $this->config = $this->extractFile();
        $this->visitor_capture_interval = $visitor_capture_interval;
    }
    public function  updateConfig($arr)
    {
        $this->config = $this->extractFile();
        if ($this->isValidateRun()) {
            $fp = fopen($this->file, &#39;w&#39;);
            if (flock($fp, LOCK_EX)) {
                fwrite($fp, json_encode(array_merge($this->config, $arr)));
                flock($fp, LOCK_UN);
            }
            fclose($fp);
            return true;
        }
        return false;
    }
    public function  getConfig($item)
    {
        if (is_array($this->config) && array_key_exists($item, $this->config)) {
            return $this->config[$item];
        }
        return null;
    }
    public function isValidateRun()
    {
        $c_time = Utils::getMicroTime();
        $run_at_time = floatval($this->getConfig(&#39;run_at_time&#39;));
        if ($c_time - $run_at_time >= $this->visitor_capture_interval) {
            return true;
        } else {
            return false;
        }
    }
}
class VisitorList extends BaseConfigFileUtils
{
    protected $visitor_list;
    /**$visitor_list [] = array(
    &#39;uin&#39; => $visitor[&#39;uin&#39;], &#39;name&#39; => $visitor[&#39;name&#39;], &#39;online&#39; => $visitor[&#39;online&#39;], &#39;time&#39; => $visitor[&#39;time&#39;],
    &#39;img&#39; => $visitor[&#39;img&#39;], &#39;yellow&#39; => $visitor[&#39;yellow&#39;], &#39;supervip&#39; => $visitor[&#39;supervip&#39;],
    );**/
    public function __construct($file)
    {
        parent::__construct($file);
        $this->visitor_list = $this->extractFile();
    }
    public function updateVisitor($visitor)
    {
        if (is_array($visitor) && !empty($visitor)) {
            foreach ($visitor as $one) {
                array_unshift($this->visitor_list, $one);
            }
        }
        $fp = fopen($this->file, &#39;w&#39;);
        if (flock($fp, LOCK_EX)) {
            fwrite($fp, json_encode($this->visitor_list));
            flock($fp, LOCK_UN);
        }
        fclose($fp);
    }
    public function addVisitor($visitor)
    {
        $list = array();
        if (is_array($visitor) && !empty($visitor)) {
            foreach ($visitor as $one) {
                if (!$this->isVisitorExist($one[&#39;name&#39;])) {
                    $list[] = $one;
                }
            }
            $this->updateVisitor($list);
        }
        return $list;
    }
    public function isVisitorExist($name)
    {
        foreach ($this->visitor_list as $one) {
            if ($one[&#39;name&#39;] == $name) {
                return true;
            }
        }
        return false;
    }
}
登入後複製
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1664
14
CakePHP 教程
1423
52
Laravel 教程
1318
25
PHP教程
1269
29
C# 教程
1248
24
qq空間如何設定權限訪問 qq空間如何設定權限訪問 Feb 23, 2024 pm 02:22 PM

qq空間如何設定權限存取?在QQ空間中是可以設定權限訪問,但是多數的小夥伴不知道QQ空間如何設定權限存取的功能,接下來就是小編為使用者帶來的qq空間設定權限存取方法圖文教程,有興趣的用戶快來一起看看吧! QQ使用教學qq空間如何設定權限存取1、先開啟QQ應用,主頁點選左上角【頭像】點選;2、然後左側展開個人資訊專區,點選左下角【設定】功能;3、進入設定頁面滑動,找到其中的【隱私】選項;4、接下來在隱私的介面,其中的【權限設定】服務;5、之後挑戰到最新頁面選擇【空間動態】;6、再次在QQ空間設置

QQ空間訪客權限怎麼設定 QQ空間訪客權限怎麼設定 Mar 15, 2024 pm 01:22 PM

QQ空間作為我們分享生活、交流情感的重要平台,承載了許多個人資訊與回憶。然而,隨著網路環境的日益複雜,如何保護個人隱私、合理控制空間存取權限成為了許多使用者關注的焦點。那麼本站小編帶來本文就將為您詳細介紹QQ空間訪客權限的設定方法,想要了解的用戶們千萬不容錯過,快來跟著本文一起操作了解一下吧!之後點選左下角的選單選項。在選單中點擊設定選項並點擊進入。進入設定選項後點選右上角的權限設定選項。點選空間拜訪權限。可依自身需求進行設定。在權限設定中可以根據自身需求隨意進行變更。

Scrapy爬蟲實作:爬取QQ空間資料進行社群網路分析 Scrapy爬蟲實作:爬取QQ空間資料進行社群網路分析 Jun 22, 2023 pm 02:37 PM

近年來,人們對社交網路分析的需求越來越高。而QQ空間又是中國最大的社群網路之一,其資料的爬取和分析對於社群網路研究來說尤其重要。本文將介紹如何使用Scrapy框架爬取QQ空間數據,並進行社會網絡分析。一、Scrapy介紹Scrapy是一個基於Python的開源Web爬取框架,它可以幫助我們快速且有效率地透過Spider機制採集網站數據,並對其進行處理和保存。 S

qq空間怎麼設定3天可見 qq空間怎麼設定3天可見 Feb 24, 2024 am 09:28 AM

qq空間怎麼設定3天可見?QQ空間是可以設定三天可見的,但是多數的小夥伴不知道QQ空間如何設定三天可見,接下來就是小編為使用者帶來的qq空間設定3天可見方法圖文教程,有興趣的用戶快來一起看看吧! QQ使用教學qq空間怎麼設定3天可見1、先開啟QQ應用,點選左上角頭像左側【設定】,設定介面點選【隱私權】;2、然後在隱私的介面,選擇其中的【權限設定】; 3.之後在權限設定功能頁,點選【好友動態權限設定】服務選項;4、接下來在好友動態設定頁面,【權限與安全】的功能點選;5、再次在最新的介面選擇【允許檢視動態

QQ空間說說如何智慧配圖 QQ空間說說如何智慧配圖 Mar 01, 2024 pm 09:13 PM

我們在QQ空間發表說說內容時可以使用智慧配圖的功能,有些朋友對此還不是很了解,以下為大家介紹一下操作方法。開啟手機上的「QQ」應用程式,進入後點選頁面左上角的個人頭像,接著在彈出的選單頁面中找到並點擊左下方的「設定」選項。 2.進入設定頁面後,在其中點選選擇「隱私權」這項進入。 3.接下來在隱私頁面裡有一個“權限設定”,看到後在上面點擊打開。 4.在權限設定頁裡的「空間動態」這一項上點選進入。 5.來到空間設定頁面後,在下方有一個“更多設定”,在上面點擊。 6.在更多設定頁面點選「空間個人化推薦」進入

為什麼qq空間網頁打不開 為什麼qq空間網頁打不開 Jul 14, 2023 am 09:59 AM

qq空間網頁打不開原因:1.網路連線問題;2、伺服器問題;3、帳號被封鎖或被限制存取;4、使用的設備和瀏覽器與QQ空間不相容。

《qq空間》如何設定權限訪問 《qq空間》如何設定權限訪問 Feb 26, 2024 pm 06:04 PM

在社群網路時代,個人隱私保護顯得格外重要。 QQ空間作為一個社群平台,也需要進行隱私設置,以保護使用者的隱私資訊。下面,我們就來講一講如何設定QQ空間權限訪問,讓您的空間更加安全和私密。 qq空間如何設定權限存取1、先開啟QQ應用,主頁點擊左上角【頭像】點擊;2、然後左側展開個人資訊專區,點擊左下角【設定】功能;3、進入到設定頁面滑動,找到其中的【隱私】選項;4、接下來在隱私的介面,其中的【權限設定】服務;5、之後挑戰到最新頁面選擇【空間動態】;6、再次在QQ空間設定介面點選【更多設置】;7、在更

qq空間影片無法儲存到手機是什麼原因 qq空間影片無法儲存到手機是什麼原因 Nov 14, 2023 pm 02:59 PM

QQ空間影片無法保存到手機可能是由於版權保護、平台限制、技術限制和安全考慮等原因導致的。其解決方法如下:1、使用者可以透過平台提供的下載按鈕或功能將影片儲存到手機上;2、使用者可以在應用程式商店或網路上搜尋相關的影片下載工具,依照工具的使用說明進行操作。

See all articles