接口地址:https://api.dzzui.com/api/qqname
请求方式:GET/POST
返回格式:JSON

请求参数说明:

名称 必填 类型 说明
 qqstringQQ号

返回参数说明:

名称 类型 说明
 codestring状态码
 namestringQQ昵称
 imgurlstringQQ头像地址

返回示例:

{"code":"200","msg":"u6210u529f","name":"u72ecu9189","imgurl":"http://q1.qlogo.cn/g?b=qq&nk=2633479934&s=100&t=1547904810"}

状态码参照:

  状态码 说明
  200获取成功

PHP演示:

<?php

header("Content-Type:text/html;charset=UTF-8");

date_default_timezone_set("PRC");

$result = file_get_contents("https://api.dzzui.com/api/qqname?qq=2633479934");

$arr=json_decode($result,true);

if ($arr["code"] == 1) {

    echo "昵称:".$arr["name"]."<br>头像链接:".$arr["imgurl"];

} else {

    echo $arr["msg"];

}

?>