八字以木、火、土、金、水去分析其旺弱,而分析之法以月令地支最为有力,其次为时支,再次为日支,最弱为年支,而天干必须见地支有同类或有生自己的五行才有用,因为只有天干一个单独的五行,其力会弱至无用。这个接口是免费的,通过get方式获取数据,数据格式json。
接口名称:八字五行强弱测算api免费接口
接口平台:奥顺居八字测算程序内部接口
接口格式:JSON
请求方式:HTTPS GET
请求示例
https://blog.wengu8.com/sm/sm/baziwuxing/year/2019/month/12/day/7/hour/4/?token=aoshunseo
接口格式 | JSON |
---|---|
请求方式 | GET |
请求参数 | year |
请求参数 | month |
请求参数 | day |
请求参数 | hour |
请求参数 | token |
返回数据
{
"errcode": 0,
"wxarr": [
"土",
"水",
"火",
"水",
"土",
"木",
"木",
"木"
],
"qtbj": {
"id": 125,
"tg": "戊",
"dz": "子",
"content": "丙火为尚,甲木为佐。"
},
"siji": {
"id": 15,
"wh": "土",
"sj": "冬",
"sjrs": "喜有火,更喜有火又有金,喜有土、木"
},
"info": {
"same": [
"土",//同类五行
"火"//同类五行
],
"diff": [
"金",//异类五行
"木",//异类五行
"水"//异类五行
],
"strength_same": "3.600",//同类得分
"strength_diff": "5.280",//异类得分
"strength_all": {
"金": "0.000",//金得分
"木": "3.240",//木得分
"水": "2.040",//水得分
"火": "1.600",//火得分
"土": "2.000"//土得分
},
"glad_use_god": [
"土",
"火"
],
"chazhi": -1.6800000000000002,
"abschazhi": 1.6800000000000002,
"ruo": "八字较弱",
"xishen": "火"//喜神
},
"ra": {
"sx": "猪",
"niannayin": "平地木",
"rinayin": "城头土",
"shinayin": "大溪水",
"yuenayin": "涧下水",
"nianganzhi": "己亥",
"yueganzhi": "丙子",
"riganzhi": "戊寅",
"shiganzhi": "甲寅",
"wuxing": [
"土水",
"木水",
"土木",
"木木"
],
"shishen": [
"劫财",
"正官",
"日主",
"七杀"
],
"niangan": "己",
"nianzhi": "亥",
"yuegan": "丙",
"yuezhi": "子",
"rigan": "戊",
"rizhi": "寅",
"shigan": "甲",
"shizhi": "寅",
"jinshu": 0,
"mushu": 3,
"shuishu": 2,
"huoshu": 1,
"tushu": 2,
"jinbi": 0,
"mubi": 37.5,
"shuibi": 25,
"huobi": 12.5,
"tubi": 25
}
}
通过接口获取的数据,然后解码数据
$data = json_decode($jsonString, true); // 第二个参数设为true时,将返回关联数组
标签:得分,请求,json,接口,五行,八字,数据格式,强弱
From: https://www.cnblogs.com/aoshunseo/p/18442171