接口数据api
接口平台:https://api.yuanfenju.com/
开发文档:https://doc.yuanfenju.com/
支持格式:JSON
请求方式:HTTP POST
//密钥
$api_secret = "wD******XhOUW******pvr";
//请求网关
$gateway_host_url = "https://api.yuanfenju.com/index.php/v1/Bazi/zwpan";
//请求参数
$curlPost['name'] = "张三";
$curlPost['sex'] = "0";
$curlPost['type'] = "0";
$curlPost['year'] = "1988";
$curlPost['month'] = "11";
$curlPost['day'] = "8";
$curlPost['hours'] = "12";
$curlPost['minute'] = "20";
$curlPost['api_key'] = $api_secret;
//curl
function curlSend($process_gateway, $data_arr, $type = 1) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $process_gateway);
curl_setopt($ch, CURLOPT_POST, $type);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data_arr));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
function process_host($curlPost,$gateway_url) {
$response = curlSend($gateway_url,$curlPost,1);
print_r($response);
}
process_host($curlPost,$gateway_host_url);
————————————————
版权声明:本文为CSDN博主「尘中客」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/s371795639/article/details/129013721
返回:
{
"errcode": 0,
"errmsg": "请求成功",
"data": {
"base_info": { //八字基本信息
"sex": "坤造", //性别,乾男 坤女
"name": "张三", //姓名
"age": 36, //年龄
"gongli": "1988年11月08日12时20分", //公历 年月日时份
"nongli": "1988年九月廿九日午时", //农历 年月日时份
"mingsihua": "机阴贪弼", //命四化:机阴贪弼
"minggong": "辰", //命宫:辰
"shengong": "辰", //身宫:辰
"zidou": "戌", //子斗:辰
"liudou": "寅", //流斗: 寅
"mingju": "土五局", //天盘局:土五局
"mingzhu": "廉贞", //命主:廉贞
"shenzhu": "文昌", //身主:文昌
"yeargz": "戊辰", //年干支:戊辰
"monthgz": "癸亥", //月干支:癸亥
"daygz": "丁卯", //日干支:丁卯
"hourgz": "丙午", //时干支:丙午
"yearnayin": "大林木", //年纳音:大林木
"monthnayin": "大海水", //月纳音:大海水
"daynayin": "炉中火", //日纳音:炉中火
"hournayin": "天河水" //时纳音:天河水
},
"gong_pan": [ // 12宫盘
{
"minggong": "疾厄宫", //命宫:疾厄宫
"yinshou": "癸亥", //寅首:癸亥
"jiangxing": "亡神", //将星:亡神
"changsheng": "临官", //长生:临官
"daxian": "55-64", //大限:55-64
"xiaoxian": "龙德", //小限:龙德
"boshi": "飞廉", //博士星:飞廉
"ziweixing": "", //紫微星:无
"ziweixing_xingyao": "", //紫微星星耀:无
"ziweixing_sihua": "", //紫微星四化:无
"tianfuxing": "太阴", //天府星:太阴
"tianfuxing_xingyao": "平",//天府星星耀:平
"tianfuxing_sihua": "权",//天府星四化:权
"monthxing": "", //月星:无
"monthxing_xingyao": "", //月星星耀:无
"monthxing_sihua": "", //月星四化:无
"hourxing": "", //时星:无
"hourxing_xingyao": "", //时星星耀:无
"hourxing_sihua": "", //时星四化:无
"yearganxing": "", //年干星:无
"yearganxing_xingyao": "", //年干星星耀:无
"yearganxing_sihua": "", //年干星四化:无
"yearzhixing": "红鸾,大耗", //年支星:红鸾,大耗
"yearzhixing_xingyao": "", //月支星星耀:无
"yearzhixing_sihua": "", //月支星四化:无
"qitaxing": "天伤", //其他星:天伤
"qitaxing_xingyao": "", //其他星星耀:无
"qitaxing_sihua": "", //其他星四化:无
"ziweixing_desc": "无紫薇星入宫,暂无详解", //紫微星坐在此宫解析
"tianfuxing_desc": "太阴星代表疾病和阴暗面,如果出现在疾厄宫中,可能会有一些阴暗或者不顺的事情发生,身体方面也需要特别留意。" //天府星坐在此宫解析
},
{
"minggong": "财帛宫",
"yinshou": "甲子",
"jiangxing": "将星",
"changsheng": "帝旺",
"daxian": "45-54",
"xiaoxian": "白虎",
"boshi": "奏书",
"ziweixing": "",
"ziweixing_xingyao": "",
"ziweixing_sihua": "",
"tianfuxing": "贪狼",
"tianfuxing_xingyao": "平",
"tianfuxing_sihua": "禄",
"monthxing": "左辅",
"monthxing_xingyao": "平",
"monthxing_sihua": "",
"hourxing": "台辅",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "正空",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "无紫薇星入宫,暂无详解",
"tianfuxing_desc": "贪狼星,代表野心和冲动。在财帛宫中出现,表示财富可能来源于野心和冲动,需要注意财务风险和管理。适合从事需要野心和冲动的行业,如创业、投资、竞争性行业等。"
},
{
"minggong": "子女宫",
"yinshou": "乙丑",
"jiangxing": "攀鞍",
"changsheng": "衰",
"daxian": "35-44",
"xiaoxian": "天德",
"boshi": "将军",
"ziweixing": "天同",
"ziweixing_xingyao": "旺",
"ziweixing_sihua": "",
"tianfuxing": "巨门",
"tianfuxing_xingyao": "庙",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "天魁,副空",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "寡宿,破碎",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "天贵",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "天同星,代表口才、交际和社交能力。在子女宫中出现,表示子女将来可能会拥有优秀的交际能力和口才,适合从事与人沟通和交流相关的工作,如销售、公关等。",
"tianfuxing_desc": "巨门星,代表智慧、才华和学识。在子女宫中出现,表示子女将来可能会有很高的学术成就和专业技能,适合从事需要高水平智力和专业能力的行业,如教育、科研等。"
},
{
"minggong": "夫妻宫",
"yinshou": "甲寅",
"jiangxing": "岁驿",
"changsheng": "病",
"daxian": "25-34",
"xiaoxian": "吊客",
"boshi": "小耗",
"ziweixing": "武曲",
"ziweixing_xingyao": "平",
"ziweixing_sihua": "",
"tianfuxing": "天相",
"tianfuxing_xingyao": "庙",
"tianfuxing_sihua": "",
"monthxing": "右弼,天月",
"monthxing_xingyao": "闲",
"monthxing_sihua": "科",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "天哭,天马",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "武曲入夫妻宫,代表着在婚姻中有很强的竞争和进取心,但也需要注意不要让竞争成为导致婚姻破裂的原因。",
"tianfuxing_desc": "天相入夫妻宫,代表与伴侣之间的关系比较和谐,有可能会遇到心灵契合的伴侣,但也需要注意保持自己的个性和自我价值。"
},
{
"minggong": "兄弟宫",
"yinshou": "乙卯",
"jiangxing": "息神",
"changsheng": "死",
"daxian": "15-24",
"xiaoxian": "病符",
"boshi": "青龙",
"ziweixing": "太阳",
"ziweixing_xingyao": "闲",
"ziweixing_sihua": "",
"tianfuxing": "天梁",
"tianfuxing_xingyao": "陷",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "天福,天官",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "太阳入兄弟宫,代表兄弟之间很阳光且积极,经常喜欢活跃和交际,具有自信和乐观的特点,但也可能有些自我中心,需要注意在兄弟之间的均衡发展。",
"tianfuxing_desc": "天梁入兄弟宫,代表兄弟之间可能会出现竞争和挑战,自己也具有一定的才能和能力,但也需要注意在兄弟之间的平衡和协调,不要产生过多的争斗和矛盾。"
},
{
"minggong": "身★命宫",
"yinshou": "丙辰",
"jiangxing": "华盖",
"changsheng": "墓",
"daxian": "5-14",
"xiaoxian": "岁建",
"boshi": "力士",
"ziweixing": "",
"ziweixing_xingyao": "",
"ziweixing_sihua": "",
"tianfuxing": "七杀",
"tianfuxing_xingyao": "庙",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "文昌",
"hourxing_xingyao": "旺",
"hourxing_sihua": "",
"yearganxing": "陀罗",
"yearganxing_xingyao": "陷",
"yearganxing_sihua": "",
"yearzhixing": "华盖",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "铃星,三台",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "无紫薇星入宫,暂无详解",
"tianfuxing_desc": "七杀星是一颗凶星,代表着杀气和破坏力。七杀入命的人通常具有竞争心强、进取心强、决策果断的特点。但是,这些人也容易陷入争斗和冲突中,需要注意控制自己的情绪和行为。"
},
{
"minggong": "父母宫",
"yinshou": "丁巳",
"jiangxing": "劫煞",
"changsheng": "绝",
"daxian": "115-124",
"xiaoxian": "晦气",
"boshi": "博士",
"ziweixing": "天机",
"ziweixing_xingyao": "平",
"ziweixing_sihua": "忌",
"tianfuxing": "",
"tianfuxing_xingyao": "",
"tianfuxing_sihua": "",
"monthxing": "天刑,天巫",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "地空,地劫",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "禄存",
"yearganxing_xingyao": "庙",
"yearganxing_sihua": "",
"yearzhixing": "天空,天喜,孤辰,劫杀",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "在父母宫,天机代表着智慧、计谋,善于谋略策划,天机主人通常会受到父母的照顾和关爱,也可能具备较高的智慧和洞察力,能够为家庭带来好运。但也可能带来过于谨慎、优柔寡断的性格特点。",
"tianfuxing_desc": "无天府星入宫,暂无详解"
},
{
"minggong": "福德宫",
"yinshou": "戊午",
"jiangxing": "灾煞",
"changsheng": "胎",
"daxian": "105-114",
"xiaoxian": "丧门",
"boshi": "官府",
"ziweixing": "紫微",
"ziweixing_xingyao": "旺",
"ziweixing_sihua": "",
"tianfuxing": "",
"tianfuxing_xingyao": "",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "擎羊",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "凤阁,解神,蜚廉",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "紫微在福德宫代表着大好机会,主要是因为紫微星是天府星的正印,天府星又与财运相关。所以,当紫微星在福德宫出现时,表明此人拥有良好的财运和事业机遇。",
"tianfuxing_desc": "无天府星入宫,暂无详解"
},
{
"minggong": "田宅宫",
"yinshou": "己未",
"jiangxing": "天煞",
"changsheng": "养",
"daxian": "95-104",
"xiaoxian": "贯索",
"boshi": "伏兵",
"ziweixing": "",
"ziweixing_xingyao": "",
"ziweixing_sihua": "",
"tianfuxing": "",
"tianfuxing_xingyao": "",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "天钺",
"yearganxing_xingyao": "庙",
"yearganxing_sihua": "",
"yearzhixing": "",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "恩光",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "无紫薇星入宫,暂无详解",
"tianfuxing_desc": "无天府星入宫,暂无详解"
},
{
"minggong": "官禄宫",
"yinshou": "庚申",
"jiangxing": "指背",
"changsheng": "长生",
"daxian": "85-94",
"xiaoxian": "官符",
"boshi": "大耗",
"ziweixing": "",
"ziweixing_xingyao": "",
"ziweixing_sihua": "",
"tianfuxing": "破军",
"tianfuxing_xingyao": "陷",
"tianfuxing_sihua": "",
"monthxing": "",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "封诰",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "龙池",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "火星,天才,天寿",
"qitaxing_xingyao": "陷",
"qitaxing_sihua": "",
"ziweixing_desc": "无紫薇星入宫,暂无详解",
"tianfuxing_desc": "在官禄宫中的破军代表着一个人的力量、战斗能力和进取心,通常表现为有冲劲、有闯劲、有爆发力,能够在困难和挑战面前勇往直前。此外,破军也可以代表事业和财富,因此破军强旺的人通常有着强大的事业和财富潜力。"
},
{
"minggong": "奴仆宫",
"yinshou": "辛酉",
"jiangxing": "咸池",
"changsheng": "沐浴",
"daxian": "75-84",
"xiaoxian": "小耗",
"boshi": "病符",
"ziweixing": "",
"ziweixing_xingyao": "",
"ziweixing_sihua": "",
"tianfuxing": "",
"tianfuxing_xingyao": "",
"tianfuxing_sihua": "",
"monthxing": "天姚",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "",
"hourxing_xingyao": "",
"hourxing_sihua": "",
"yearganxing": "",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "咸池",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "天使",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "无紫薇星入宫,暂无详解",
"tianfuxing_desc": "无天府星入宫,暂无详解"
},
{
"minggong": "迁移宫",
"yinshou": "壬戌",
"jiangxing": "月煞",
"changsheng": "冠带",
"daxian": "65-74",
"xiaoxian": "大耗",
"boshi": "喜神",
"ziweixing": "廉贞",
"ziweixing_xingyao": "庙",
"ziweixing_sihua": "",
"tianfuxing": "天府",
"tianfuxing_xingyao": "平",
"tianfuxing_sihua": "",
"monthxing": "阴煞",
"monthxing_xingyao": "",
"monthxing_sihua": "",
"hourxing": "文曲",
"hourxing_xingyao": "平",
"hourxing_sihua": "",
"yearganxing": "",
"yearganxing_xingyao": "",
"yearganxing_sihua": "",
"yearzhixing": "天虚",
"yearzhixing_xingyao": "",
"yearzhixing_sihua": "",
"qitaxing": "八座",
"qitaxing_xingyao": "",
"qitaxing_sihua": "",
"ziweixing_desc": "在迁移宫中,廉贞星代表个人的忠诚、正义和责任心。如果廉贞星在吉位,个人在新环境中有更多机会和条件发挥自己的正义感和责任心,得到他人的尊重和信任;如果廉贞星在凶位,则可能会面临道德和责任的问题",
"tianfuxing_desc": "在迁移宫中,天府代表了财富、资产、物质方面的变动。如果天府被带到了迁移宫,可能意味着你将会面临财务上的变化,可能是有意外的收入,也可能是需要花费更多的金钱去处理一些事情。"
}
]
}
}