| 状态码 | 说明 |
|---|---|
| 200 | 请求成功 |
| 403 | 权限不足 |
| 404 | 资源未找到 |
| 429 | 请求频繁 |
| 500 | 服务器错误 |
<?php
$url = "https://api.scdnn.com/API/yiyan/api.php";
$params = [];
$url .= "?" . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.scdnn.com/API/yiyan/api.php"
params = {}
response = requests.get(url, params=params)
print(response.text)
const url = new URL("https://api.scdnn.com/API/yiyan/api.php");
const params = {};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
fetch(url).then(res => res.text()).then(data => console.log(data));