稳定、快速、免费的 API 接口服务
获取QQ昵称、性别、年龄、qid ID身份卡、等级等信息
接口地址: https://58.linkpc.net/doc/qqxx.html
返回格式: 请看返回示例
请求方式: GET
请求示例: https://58.linkpc.net/api/qqxx?qq=836721503
请求参数说明:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
是 | string | 查询的QQ |
返回参数说明:
名称 | 类型 | 说明 |
---|---|---|
code | string | 返回的状态码 |
data | string | 返回的数据 |
msg | string | 返回的消息 |
string | QQ号 | |
nickname | string | 昵称 |
sex | string | 性别 |
age | string | 年龄 |
level | string | QQ等级 |
qid | string | qid身份牌 |
vip_level | string | VIP等级 |
login_days | string | 连续登录天数 |
sing | string | 个性签名 |
avatar | string | QQ头像 |
返回示例:
null
错误码格式说明:
名称 | 类型 | 说明 |
---|
代码示例:
<?php
header('Content-type: application/json; charset=utf-8');
date_default_timezone_set('PRC');
$url = 'https://58.linkpc.net/api/qqxx';
$type = isset($_GET['type']) ? $_GET['type'] : '';
if ($type == 'json' || $type == 'JSON') {
$result = file_get_contents($url . '?type=json');
echo htmlspecialchars($result);
} else {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
curl_close($ch);