请求方式(创建test.php文件,将下方代码复制进去)
域名/test.php?qq=你的QQ
代码:
<?php
header("Access-Control-Allow-Origin:*");
header('Content-type: application/json');
$id = $_GET['qq'];
$spe = 640;
$get_info = file_get_contents('https://api.unipay.qq.com/v1/r/1450000186/wechat_query?cmd=1&pf=mds_storeopen_qb-__mds_qqclub_tab_-html5&pfkey=pfkey&from_h5=1&from_https=1&openid=openid&openkey=openkey&session_id=hy_gameid&session_type=st_dummy&qq_appid=&offerId=1450000186&sandbox=&provide_uin=' . $id);
$names = json_decode($get_info, true);
if(!isset($names['nick'])) return false;
$name = urldecode($names['nick']);
$txurl = 'https://q2.qlogo.cn/headimg_dl?dst_uin='.$id.'&spec='.$spe.'';
$info = array('code' => '200','qq' => $id,'imgurl' =>$txurl,'name' => $name,);
echo json_encode($info,320);
?>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。