这是一个基于周易梅花易数算法、每日仅限一次的在线占卜API,它能根据用户ID生成包含原卦、互卦、变卦的完整占卜结果,并支持JSON和纯文本两种格式返回。
https://api.iosxx.cn/API/zhanbu.php
https://api.iosxx.cn/API/zhanbu.php?id=张三
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
string | 是 | 名字或者占卜内容 |
type |
string | 否 | 格式:json或text |
| 状态码 | 说明 |
|---|---|
200 | 请求成功 |
403 | 权限不足或API密钥无效 |
404 | 请求的资源不存在 |
429 | 请求过于频繁,已被限流 |
500 | 服务器内部错误 |
<?php
$url = 'https://api.iosxx.cn/API/zhanbu.php';
$params = [
'id' => 'YOUR_VALUE',
'type' => 'YOUR_VALUE',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.iosxx.cn/API/zhanbu.php"
params = {
"id": "YOUR_VALUE",
"type": "YOUR_VALUE",
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.iosxx.cn/API/zhanbu.php');
const params = {
'id': 'YOUR_VALUE',
'type': 'YOUR_VALUE',
};
Object.keys(params).forEach(key =>
url.searchParams.append(key, params[key]));
fetch(url)
.then(res => res.text())
.then(data => console.log(data))
.catch(err => console.error(err));
curl -X GET "https://api.iosxx.cn/API/zhanbu.php?id=YOUR_VALUE&type=YOUR_VALUE"