中国科学家
中国科学院院士---中国人一定要铭记他们为国家做出的杰出贡献

接口地址: https://58.linkpc.net/api/ksj

返回格式: JSON

请求方式: GET

请求示例: https://58.linkpc.net/api/ksj?type=json

请求参数说明:

名称 必填 类型 说明
type string 返回格式默认HTML可选JSON
lemmaTitle string 可指定科学家名字比如lemmaTitle=钱学森

返回参数说明:

名称 类型 说明
desc string 已故日期
reference string 参考
lemmaTitle string 科学家姓名
lemmaDesc string 简单描述
summary string 详细描述
coverPic string 科学家照片

返回示例:

{
"desc": "逝世日期:1991.04.16",
"reference": [],
"lemmaTitle": "侯学煜",
"lemmaDesc": "中国科学院院士、植物生态学家、地植物学家",
"summary": "侯学煜(1912年4月2日—1991年4月16日),安徽和县人,植物生态学家,地植物学家,中国科学院学部委员(院士),生前是中国科学院植物研究所研究员。侯学煜1937年从中央大学毕业;1947年从美国宾夕法尼亚州立大学毕业,并获得硕士学位;1949年4月获得美国宾夕法尼亚州立大学博士学位;1950年1月任中国科学院植物研究所研究员;1951年加入中国民主同盟;1980年当选为中国科学院学部委员(院士);1986年加入中国共产党;1991年4月16日在北京逝世,享年79岁。侯学煜长期从事地植物学、植被制图、植物生态学等研究和教学工作。",
"coverPic": "https:\/\/bkimg.cdn.bcebos.com\/smart\/d62a6059252dd42a28349f138d6f4cb5c9ea15ce1274-bkimg-process,v_1,rw_1,rh_1,maxl_216,pad_1,color_ffffff?x-bce-process=image\/format,f_auto",
"encodeItemId": "465f421a53be9fbbf14922ec",
"lemmaId": 3557116
}

错误码格式说明:

名称 类型 说明

代码示例:

                            <?php
header('Content-type: application/json; charset=utf-8');
date_default_timezone_set('PRC');
$url = 'https://58.linkpc.net/api/ksj';
$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);

if (strpos($contentType, 'image') !== false) {
header('Content-Type: ' . $contentType);
echo $response;
} elseif (strpos($contentType, 'text') !== false) {
header('Content-Type: ' . $contentType);
echo $response;
} elseif (strpos($contentType, 'application/json') !== false) {
header('Content-Type: application/json');
echo $response;
} else {
header('Content-Type: text/html');
echo $response;
}
}
?>