当前位置:   article > 正文

奇门排盘 API接口_算命的api接口

算命的api接口

接口数据api

接口平台:https://api.yuanfenju.com/

开发文档缘份居国学研究开发者API

支持格式:JSON

请求方式:HTTP POST

  1. <?php
  2. //您的密钥
  3. $api_secret = "wD******XhOUW******pvr";
  4. //请求择日择时接口
  5. $gateway_host_url = "https://doc.yuanfenju.com/liupan/qimendunjia.html";
  6. //请求参数
  7. $request_data = [
  8. 'name' => $api_secret,
  9. 'sex' => '0',
  10. 'type' => '0',
  11. 'year' => '1999',
  12. 'month' => '12',
  13. 'day' => '3',
  14. 'hours' => '12',
  15. 'minute' => '3',
  16. ];
  17. //curl
  18. function curlSend($process_gateway, $data_arr, $type = 1) {
  19. $ch = curl_init();
  20. curl_setopt($ch, CURLOPT_URL, $process_gateway);
  21. curl_setopt($ch, CURLOPT_POST, $type);
  22. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data_arr));
  23. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  24. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  25. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  26. curl_setopt($ch, CURLOPT_FAILONERROR, true); // Set this option to handle errors
  27. $response = curl_exec($ch);
  28. if ($response === false) {
  29. $error_message = curl_error($ch);
  30. // Handle or output the error message as needed
  31. echo "cURL error: " . $error_message;
  32. }
  33. curl_close($ch);
  34. return $response;
  35. }
  36. function process_host($curlPost,$gateway_url) {
  37. $response = curlSend($gateway_url,$curlPost,1);
  38. print_r($response);
  39. }
  40. process_host($request_data,$gateway_host_url);

返回数据:

  1. <?php
  2. {
  3. "errcode": 0,
  4. "errmsg": "请求成功",
  5. "notice": "本次测算结果仅供娱乐使用,请勿用于封建迷信和违法用途。",
  6. "data": {
  7. "name": "章三",
  8. "sex": "乾造",
  9. "gongli": "2000年01月09日12时03分",
  10. "nongli": "1999年腊月初三日午时",
  11. "sizhu_info": {
  12. "year_gan": "己",
  13. "year_zhi": "卯",
  14. "month_gan": "丁",
  15. "month_zhi": "丑",
  16. "day_gan": "丙",
  17. "day_zhi": "寅",
  18. "hour_gan": "甲",
  19. "hour_zhi": "午"
  20. },
  21. "xunkong_info": {
  22. "year_xunkong": "申酉空",
  23. "month_xunkong": "申酉空",
  24. "day_xunkong": "亥戌空",
  25. "hour_xunkong": "辰巳空"
  26. },
  27. "xunshou_info": {
  28. "year_xunshou": "甲戌",
  29. "month_xunshou": "甲戌",
  30. "day_xunshou": "甲子",
  31. "hour_xunshou": "甲午"
  32. },
  33. "zhifu_info": {
  34. "zhifu_name": "天禽",
  35. "zhifu_luogong": "五",
  36. "zhishi_name": "死门",
  37. "zhishi_luogong": "五"
  38. },
  39. "fushou": "辛",
  40. "xunshou": "甲午辛",
  41. "dunju": "上元阳遁二局",
  42. "dingju": "拆补法定局",
  43. "panlei": "转盘奇门",
  44. "jieqi_pre": "公历 2000-01-06 09:00:42 小寒",
  45. "jieqi_next": "公历 2000-01-21 02:23:03 大寒",
  46. "gong_pan": [{
  47. "shenpan": {
  48. "bashen": "六合"
  49. },
  50. "tianpan": {
  51. "jiuxing_tianqin_sanqiliuyi": "",
  52. "jiuxing_tianqin": "",
  53. "jiuxing": "天蓬",
  54. "sanqiliuyi": "乙",
  55. "bashen": ""
  56. },
  57. "dipan": {
  58. "bashen": "",
  59. "bagua": "",
  60. "sanqiliuyi": "乙"
  61. },
  62. "renpan": {
  63. "bamen": "休门"
  64. },
  65. "description": {
  66. "gong_ju": "伏吟局",
  67. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
  68. "luo_gong_desc": "休门象征着休息、宁静、安逸,常与养生、健康相关......"
  69. }
  70. }, {
  71. "shenpan": {
  72. "bashen": "白虎"
  73. },
  74. "tianpan": {
  75. "jiuxing_tianqin_sanqiliuyi": "",
  76. "jiuxing_tianqin": "",
  77. "jiuxing": "天任",
  78. "sanqiliuyi": "丁",
  79. "bashen": ""
  80. },
  81. "dipan": {
  82. "bashen": "",
  83. "bagua": "",
  84. "sanqiliuyi": "丁"
  85. },
  86. "renpan": {
  87. "bamen": "生门"
  88. },
  89. "description": {
  90. "gong_ju": "伏吟局",
  91. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
  92. "luo_gong_desc": "生门象征着远行以及婚姻嫁娶恋爱相关;因此......"
  93. }
  94. }, {
  95. "shenpan": {
  96. "bashen": "玄武"
  97. },
  98. "tianpan": {
  99. "jiuxing_tianqin_sanqiliuyi": "",
  100. "jiuxing_tianqin": "",
  101. "jiuxing": "天冲",
  102. "sanqiliuyi": "己",
  103. "bashen": ""
  104. },
  105. "dipan": {
  106. "bashen": "",
  107. "bagua": "",
  108. "sanqiliuyi": "己"
  109. },
  110. "renpan": {
  111. "bamen": "伤门"
  112. },
  113. "description": {
  114. "gong_ju": "伏吟局",
  115. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状态,代表困难......",
  116. "luo_gong_desc": "伤门象征着你所面临的困难和挑战;因此伤门落震宫,你的困难和......"
  117. }
  118. }, {
  119. "shenpan": {
  120. "bashen": "九地"
  121. },
  122. "tianpan": {
  123. "jiuxing_tianqin_sanqiliuyi": "",
  124. "jiuxing_tianqin": "",
  125. "jiuxing": "天辅",
  126. "sanqiliuyi": "庚",
  127. "bashen": ""
  128. },
  129. "dipan": {
  130. "bashen": "",
  131. "bagua": "",
  132. "sanqiliuyi": "庚"
  133. },
  134. "renpan": {
  135. "bamen": "杜门"
  136. },
  137. "description": {
  138. "gong_ju": "伏吟局",
  139. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
  140. "luo_gong_desc": "杜门象征着堵塞和藏匿的意思;因此杜门落巽宫,事情进展缓慢,且......"
  141. }
  142. }, {
  143. "shenpan": {
  144. "bashen": "九天"
  145. },
  146. "tianpan": {
  147. "jiuxing_tianqin_sanqiliuyi": "",
  148. "jiuxing_tianqin": "",
  149. "jiuxing": "天英",
  150. "sanqiliuyi": "丙",
  151. "bashen": ""
  152. },
  153. "dipan": {
  154. "bashen": "",
  155. "bagua": "",
  156. "sanqiliuyi": "丙"
  157. },
  158. "renpan": {
  159. "bamen": "景门"
  160. },
  161. "description": {
  162. "gong_ju": "伏吟局",
  163. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状......",
  164. "luo_gong_desc": "景门代表考试、升学,学业相关;因此景门落离宫,......"
  165. }
  166. }, {
  167. "shenpan": {
  168. "bashen": "值符"
  169. },
  170. "tianpan": {
  171. "jiuxing_tianqin_sanqiliuyi": "辛",
  172. "jiuxing_tianqin": "禽",
  173. "jiuxing": "天芮",
  174. "sanqiliuyi": "戊",
  175. "bashen": ""
  176. },
  177. "dipan": {
  178. "bashen": "",
  179. "bagua": "",
  180. "sanqiliuyi": "戊"
  181. },
  182. "renpan": {
  183. "bamen": "死门"
  184. },
  185. "description": {
  186. "gong_ju": "伏吟局",
  187. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力......",
  188. "luo_gong_desc": "死门代表过去的一些负面,消极的情绪相关;因此死门落......"
  189. }
  190. }, {
  191. "shenpan": {
  192. "bashen": "螣蛇"
  193. },
  194. "tianpan": {
  195. "jiuxing_tianqin_sanqiliuyi": "",
  196. "jiuxing_tianqin": "",
  197. "jiuxing": "天柱",
  198. "sanqiliuyi": "癸",
  199. "bashen": ""
  200. },
  201. "dipan": {
  202. "bashen": "",
  203. "bagua": "",
  204. "sanqiliuyi": "癸"
  205. },
  206. "renpan": {
  207. "bamen": "惊门"
  208. },
  209. "description": {
  210. "gong_ju": "伏吟局",
  211. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得......",
  212. "luo_gong_desc": "惊门代表外部环境出现的突发的变化或不稳定因素,会......"
  213. }
  214. }, {
  215. "shenpan": {
  216. "bashen": "太阴"
  217. },
  218. "tianpan": {
  219. "jiuxing_tianqin_sanqiliuyi": "",
  220. "jiuxing_tianqin": "",
  221. "jiuxing": "天心",
  222. "sanqiliuyi": "壬",
  223. "bashen": ""
  224. },
  225. "dipan": {
  226. "bashen": "",
  227. "bagua": "",
  228. "sanqiliuyi": "壬"
  229. },
  230. "renpan": {
  231. "bamen": "开门"
  232. },
  233. "description": {
  234. "gong_ju": "伏吟局",
  235. "gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状态......",
  236. "luo_gong_desc": "开门象征机遇、财富与事业的信息;因此开门落乾宫,意味着......"
  237. }
  238. }, {
  239. "shenpan": {
  240. "bashen": ""
  241. },
  242. "tianpan": {
  243. "jiuxing_tianqin_sanqiliuyi": "",
  244. "jiuxing_tianqin": "",
  245. "jiuxing": "",
  246. "sanqiliuyi": "",
  247. "bashen": ""
  248. },
  249. "dipan": {
  250. "bashen": "",
  251. "bagua": "",
  252. "sanqiliuyi": "辛"
  253. },
  254. "renpan": {
  255. "bamen": "中门"
  256. },
  257. "description": {
  258. "gong_ju": "未知局",
  259. "gong_ju_desc": "不做解析",
  260. "luo_gong_desc": "中门并非八门之一,而是甲的隐身地,故为遁甲,甲是......"
  261. }
  262. }]
  263. }
  264. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/437805
推荐阅读
相关标签
  

闽ICP备14008679号