介绍

可通过此API查询到任意QQ的空间今日和全部人气值

接口URL地址

https://h5.qzone.qq.com/p/r/cgi-bin/qzone_dynamic_v7.cgi?uin=【QQ号码】&param=4|848|311

PHP实例代码

<?php
       $qq = '1900432277';
       $url='https://h5.qzone.qq.com/p/r/cgi-bin/qzone_dynamic_v7.cgi?uin='.$qq.'&param=4|848|311';
       $return=file_get_contents($url);
       preg_match("/{\"mod\"(.*?){\"mod/sS",$return,$data);
       preg_match_all("/\"todaycount\":(.*?),/sS",$data[1],$jrrq); //今日人气
       preg_match_all("/\"totalcount\":(.*?)}/sS",$data[1],$qbrq); //全部人气
       if($jrrq || $qbrq){
         exit('{"code":1,"msg":"获取成功","jrrq":"'.$jrrq[1][0].'","qbrq":"'.$qbrq[1][0].'"}');
       }else{
         exit('{"code":0,"msg":"请输入正确的QQ号"}');
       }
?>

最后修改:2021 年 09 月 16 日
如果觉得我的文章对你有用,请随意赞赏