| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| year | string | 是 | 年 |
| month | string | 是 | 月 |
| day | string | 是 | 日 |
| 参数名称 | 类型 | 说明 |
|---|---|---|
| year | string | 年 |
| month | string | 月 |
| day | string | 日 |
| yangli | string | 阳历 |
| nongli | string | 农历 |
| star | string | 星座 |
| taishen | string | 胎神 |
| wuxing | string | 五行 |
| chong | string | 冲 |
| sha | string | 煞 |
| shengxiao | string | 生肖 |
| jiri | string | 吉日 |
| zhiri | string | 值日天神 |
| xiongshen | string | 凶神 |
| jishenyiqu | string | 吉神宜趋 |
| caishen | string | 财神 |
| xishen | string | 喜神 |
| fushen | string | 福神 |
| suici | string | 岁次 |
| yi | string | 宜 |
| ji | string | 忌 |
| eweek | string | 英文星期 |
| emonth | string | 英文月 |
| week | string | 星期 |
<?php
require_once 'curl.func.php';
$appkey = 'your_appkey_here';//你的appkey
$year = '2015';
$month = '10';
$day = '27';
$url = "https://api.jisuapi.com/huangli/date?appkey=$appkey&year=$year&month=$month&day=$day";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
echo $jsonarr['msg'];
exit();
}
$result = $jsonarr['result'];
echo $result['year'].' '.$result['month'].' '.$result['day'].' '.$result['yangli'].' '.$result['nongli'].' '.$result['star'].' '.$result['taishen'].' '.$result['wuxing'].' '.$result['chong'].' '.$result['sha'].' '.$result['shengxiao'].' '.$result['jiri'].' '.$result['zhiri'].' '.$result['xiongshen'].' '.$result['jishenyiqu'].' '.$result['caishen'].' '.$result['xishen'].' '.$result['fushen'].' '.implode(' ',$result['suici']).' '.implode(' ',$result['yi']).' '.implode(' ',$result['ji']).' '.$result['eweek'].' '.$result['emonth'].' '.$result['week'].'
';
{
"status": 0,
"msg": "ok",
"result": {
"year": "2015",
"month": "10",
"day": "27",
"yangli": "公元2015年10月27日",
"nongli": "农历二〇一五年九月十五",
"star": "天蝎座",
"taishen": "厨灶碓外西南",
"wuxing": "涧下水",
"chong": "冲(庚午)马",
"sha": "煞南",
"shengxiao": "羊",
"jiri": "天牢(黑道)满日",
"zhiri": "天牢(黑道凶日)",
"xiongshen": "灾煞 天火 大煞 归忌 天牢 触水龙",
"jishenyiqu": "天德 月德 时德 福德 民日 天巫 普护 鸣犬对",
"caishen": "西南",
"xishen": "西南",
"fushen": "正东",
"suici": [
"乙未年",
"丙戌月",
"丙子日"
],
"yi": [
"纳采",
"成服"
],
"ji": [
"入宅",
"上梁",
"谢土"
],
"eweek": "TUESDAY",
"emonth": "October",
"week": "二"
}
}
| 代号 | 说明 |
|---|---|
| 201 | 日期不正确 |
| 203 | 没有信息 |
| 代号 | 说明 |
|---|---|
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁止 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |


© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875