稳定、快速、免费的 API 接口服务
电子竞技新闻资讯热点
接口地址: https://58.linkpc.net/doc/esports.html
返回格式: JSON
请求方式: GET
请求示例: https://58.linkpc.net/api/esports?num=10
请求参数说明:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
num | 是 | int | 返回数量1-50,默认10 |
page | 否 | int | 翻页 |
rand | 否 | int | 随机获取 |
word | 否 | String | 检索关键词 |
返回参数说明:
名称 | 类型 | 说明 |
---|---|---|
curpage | int | 当前页 |
allnum | int | 结果数 |
id | String | 新闻唯一ID |
ctime | Date | 发布时间 |
title | String | 文章标题 |
description | String | 文章描述 |
source | String | 文章来源 |
picUrl | String | 封面图片 |
url | String | 文章地址 |
返回示例:
{
"code": 200,
"msg": "success",
"data": {
"curpage": 1,
"allnum": 10,
"newslist": [
{
"id": "382d9e65f5a9ed1ed641904e440f8c10",
"ctime": "2024-11-21 23:00",
"title": "《胜利女神:妮姬》新角色SSR芙罗拉登场,新时装与多重活动来袭",
"description": "亲爱的指挥官们,备受期待的《胜利女神:妮姬》全新版本已于11月21日盛大更新!本次更新推出了新角色芙罗拉、全新时装、多项活动及竞技场重...",
"source": "新浪电竞",
"picUrl": "\/\/n.sinaimg.cn\/games\/transform\/639\/w400h239\/20241121\/e1ec-6cc108441b3549e465cefbe5fc2c39b6.png",
"url": "\/\/dj.sina.com.cn\/article\/ncwvuih1277784.shtml"
},
{
"id": "0e92f7a65d221c6e8029e655b94f688d",
"ctime": "2024-11-21 22:00",
"title": "《潜行者2》豪华版免费下载,XGP会员购买教程一步到位",
"description": "《潜行者2:切尔诺贝利之心》已上线,带领玩家探索切尔诺贝利的神秘废墟。CC加速器不仅提供游戏免费下载,还有加入XGP会员购买游戏的详细...",
"source": "新浪电竞",
"picUrl": "https:\/\/n.sinaimg.cn\/games\/639\/w400h239\/20241121\/4582-a11e73327a2862956715f7dd82564e09.png",
"url": "\/\/dj.sina.com.cn\/article\/ncwvuie4499918.shtml"
},
{
"id": "2bb5ab8493f51a4dee4a72629b59b242",
"ctime": "2024-11-21 17:00",
"title": "Steam多人种田游戏露玛岛现已发售,首发价46元",
"description": "由荷兰独立工作室FeelFreeGames开发的多人种田游戏《露玛岛》现已正式上线Steam,首发折扣价46.4元,折扣期为两周。",
"source": "新浪电竞",
"picUrl": "https:\/\/n.sinaimg.cn\/games\/639\/w400h239\/20241121\/770a-601abe17467b9337a229a90ae1a9ed4e.jpg",
"url": "\/\/dj.sina.com.cn\/article\/ncwvitn1379952.shtml"
},
{
"id": "30ea785642b34146bf31107005637b3e",
"ctime": "2024-11-21 16:00",
"title": "Blast Slam S1分组出炉:XG直面PARI BB和Falcons",
"description": "Blast发布了旗下DOTA2赛事BlastSlamS1的分组及赛程公告,XG与梦幻联赛S24的冠军Falcons、亚军BB和殿军...",
"source": "新浪电竞",
"picUrl": "\/\/n.sinaimg.cn\/games\/transform\/639\/w400h239\/20241121\/a67a-adc8be76d6bcd9901f118599a66aa207.png",
"url": "\/\/dj.sina.com.cn\/article\/ncwvcmq1432695.shtml"
},
{
"id": "41a59a93ef78aa9d9475410afd6ffe50",
"ctime": "2024-11-21 16:00",
"title": "上海Major欧洲RMR:无情碾压!Spirit 13-1 B8",
"description": "欧洲RMRA组的比赛于昨日圆满结束,B组的比赛在今天拉开序幕。两只独联体队伍Spirit和B8在首轮即相遇,世界第4对阵世界19,毫...",
"source": "新浪电竞",
"picUrl": "https:\/\/n.sinaimg.cn\/games\/639\/w400h239\/20241121\/0a84-035faa6141fc85545f477b5cc45e2f03.jpg",
"url": "\/\/dj.sina.com.cn\/article\/ncwvcmn4657393.shtml"
},
{
"id": "a571914809347feb03719f53d29e3e24",
"ctime": "2024-11-21 16:00",
"title": "上海Major欧洲RMR:有惊无险 G2 13-7 NIP",
"description": "上海Major欧洲RMRB组,G2对阵NIP,先做防守方的G2展现出强大的压制力拿到10-2领先,下半场再拿下手枪局直接收下赛点,最...",
"source": "新浪电竞",
"picUrl": "https:\/\/n.sinaimg.cn\/games\/639\/w400h239\/20241121\/d89d-3d43a945b91b6d8679cefa8c057d4cc8.jpg",
"url": "\/\/dj.sina.com.cn\/article\/ncwvcmn4658484.shtml"
},
{
"id": "ea51895f2a0c946321bfeccff9e30ce6",
"ctime": "2024-11-21 16:00",
"title": "上海Major欧洲RMR:独木难支!VP 14-16 Passion UA",
"description": "上海Major欧洲RMRB组,VP对阵PassionUA,一上来双方在比分上你追我赶谁都没能拉开比分,下半场率先拿到赛点的Pass...",
"source": "新浪电竞",
"picUrl": "\/\/n.sinaimg.cn\/games\/transform\/639\/w400h239\/20241121\/aa6f-460b77709fd65ba401dac4e1d882a897.jpg",
"url": "\/\/dj.sina.com.cn\/article\/ncwvcmq1436739.shtml"
},
{
"id": "c6a216dc9deee12eb2e76c2b4b8a042a",
"ctime": "2024-11-21 16:00",
"title": "《潜行者2:切尔诺贝利之心》正式发售!",
"description": "由GSCGameWorld开发的次世代第一人称射击游戏《潜行者2:切尔诺贝利之心》现已正式发售。在游戏中玩家将踏入广阔而神秘的切尔...",
"source": "新浪电竞",
"picUrl": "\/\/n.sinaimg.cn\/games\/transform\/639\/w400h239\/20241121\/2d2e-22ee1a4ccce645225dea962e161ebac2.png",
"url": "\/\/dj.sina.com.cn\/article\/ncwvcmk6961579.shtml"
},
{
"id": "48d420e05ebb99c123e97d5cfe8704a6",
"ctime": "2024-11-21 13:00",
"title": "在每一次进化中逐渐揭晓的赛季!云顶之弈 双城之战正式上线",
"description": "小小英雄也喜欢追剧?随着《英雄联盟:双城之战》第二季的热播,《英雄联盟:云顶之弈》S13赛季“双城之战2”也震撼上线!这一赛季以皮尔特...",
"source": "新浪电竞",
"picUrl": "https:\/\/n.sinaimg.cn\/games\/639\/w400h239\/20241121\/a7bc-c44d4b78ad4ac015f148b886be51b590.png",
"url": "\/\/dj.sina.com.cn\/article\/ncwuxcn7066967.shtml"
},
{
"id": "b17cbb3cbee0f25cfc903f818acd9640",
"ctime": "2024-11-21 13:00",
"title": "上海Major欧洲RMR A组晋级战队一览",
"description": "上海Major欧洲RMRA组比赛已经正式结束,最后一日比赛中,fnatic以其更高的Bu分成功晋级上海Major开幕阶段,而GL在第...",
"source": "新浪电竞",
"picUrl": "\/\/n.sinaimg.cn\/games\/transform\/639\/w400h239\/20241121\/89ea-d8e3bae3a9580ad8ad656fb908aa9979.jpg",
"url": "\/\/dj.sina.com.cn\/article\/ncwuxcn7067527.shtml"
}
]
}
}
错误码格式说明:
名称 | 类型 | 说明 |
---|
代码示例:
<?php
header('Content-type: application/json; charset=utf-8');
date_default_timezone_set('PRC');
$url = 'https://58.linkpc.net/api/esports';
$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);