首页 > 其他分享 >奇门排盘 api数据接口

奇门排盘 api数据接口

时间:2024-02-28 10:11:52浏览次数:23  
标签:ch setopt 排盘 api error curl gateway CURLOPT 奇门

奇门遁甲,奇门遁甲是中国古代的一种术数,它融合了天文学、历法学、战争学、谋略学和哲学等多个领域的知识。奇门遁甲的占测主要分为天、门、地三盘,象征三才。天盘上有九星,中盘有八宫(中宫寄二宫)布八门,地盘上有八个方位,代表静止不动的元素。根据具体时日,以六仪、三奇、八门、九星排局,以占测人类社会和自然世界,在人事关系方面选择吉时吉方,构成了中国神秘文化中的一个独特门类。

接口名称:流盘-奇门遁甲

接口平台:缘份居国学研究(https://doc.yuanfenju.com/)

接口地址:https://doc.yuanfenju.com/liupan/qimendunjia.html

支持格式:application/x-www-form-urlencoded

请求方式:HTTP GET/POST

请求示例:

点击查看代码
<?php
 
//您的密钥
$api_secret = "wD******XhOUW******pvr";
//请求择日择时接口
$gateway_host_url = "https://doc.yuanfenju.com/liupan/qimendunjia.html";
 
//请求参数
$request_data = [
    'name' => $api_secret,
    'sex' => '0',
    'type' => '0',
    'year' => '1999',
    'month' => '12',
    'day' => '3',
    'hours' => '12',
    'minute' => '3',
 
];
 
//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);
    curl_setopt($ch, CURLOPT_FAILONERROR, true); // Set this option to handle errors
 
    $response = curl_exec($ch);
 
    if ($response === false) {
        $error_message = curl_error($ch);
        // Handle or output the error message as needed
        echo "cURL error: " . $error_message;
    }
 
    curl_close($ch);
    return $response;
}
 
function process_host($curlPost,$gateway_url) {
    $response = curlSend($gateway_url,$curlPost,1);
    print_r($response);
 
}
 
process_host($request_data,$gateway_host_url);
 

奇门排盘接口JSON返回示例:

点击查看代码
<?php
 
{
    "errcode": 0,
	"errmsg": "请求成功",
	"notice": "本次测算结果仅供娱乐使用,请勿用于封建迷信和违法用途。",
	"data": {
    "name": "章三",
		"sex": "乾造",
		"gongli": "2000年01月09日12时03分",
		"nongli": "1999年腊月初三日午时",
		"sizhu_info": {
        "year_gan": "己",
			"year_zhi": "卯",
			"month_gan": "丁",
			"month_zhi": "丑",
			"day_gan": "丙",
			"day_zhi": "寅",
			"hour_gan": "甲",
			"hour_zhi": "午"
		},
		"xunkong_info": {
        "year_xunkong": "申酉空",
			"month_xunkong": "申酉空",
			"day_xunkong": "亥戌空",
			"hour_xunkong": "辰巳空"
		},
		"xunshou_info": {
        "year_xunshou": "甲戌",
			"month_xunshou": "甲戌",
			"day_xunshou": "甲子",
			"hour_xunshou": "甲午"
		},
		"zhifu_info": {
        "zhifu_name": "天禽",
			"zhifu_luogong": "五",
			"zhishi_name": "死门",
			"zhishi_luogong": "五"
		},
		"fushou": "辛",
		"xunshou": "甲午辛",
		"dunju": "上元阳遁二局",
		"dingju": "拆补法定局",
		"panlei": "转盘奇门",
		"jieqi_pre": "公历 2000-01-06 09:00:42 小寒",
		"jieqi_next": "公历 2000-01-21 02:23:03 大寒",
		"gong_pan": [{
        "shenpan": {
            "bashen": "六合"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天蓬",
				"sanqiliuyi": "乙",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "乙"
			},
			"renpan": {
            "bamen": "休门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
				"luo_gong_desc": "休门象征着休息、宁静、安逸,常与养生、健康相关......"
			}
		}, {
        "shenpan": {
            "bashen": "白虎"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天任",
				"sanqiliuyi": "丁",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "丁"
			},
			"renpan": {
            "bamen": "生门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
				"luo_gong_desc": "生门象征着远行以及婚姻嫁娶恋爱相关;因此......"
			}
		}, {
        "shenpan": {
            "bashen": "玄武"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天冲",
				"sanqiliuyi": "己",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "己"
			},
			"renpan": {
            "bamen": "伤门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状态,代表困难......",
				"luo_gong_desc": "伤门象征着你所面临的困难和挑战;因此伤门落震宫,你的困难和......"
			}
		}, {
        "shenpan": {
            "bashen": "九地"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天辅",
				"sanqiliuyi": "庚",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "庚"
			},
			"renpan": {
            "bamen": "杜门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,......",
				"luo_gong_desc": "杜门象征着堵塞和藏匿的意思;因此杜门落巽宫,事情进展缓慢,且......"
			}
		}, {
        "shenpan": {
            "bashen": "九天"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天英",
				"sanqiliuyi": "丙",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "丙"
			},
			"renpan": {
            "bamen": "景门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状......",
				"luo_gong_desc": "景门代表考试、升学,学业相关;因此景门落离宫,......"
			}
		}, {
        "shenpan": {
            "bashen": "值符"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "辛",
				"jiuxing_tianqin": "禽",
				"jiuxing": "天芮",
				"sanqiliuyi": "戊",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "戊"
			},
			"renpan": {
            "bamen": "死门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力......",
				"luo_gong_desc": "死门代表过去的一些负面,消极的情绪相关;因此死门落......"
			}
		}, {
        "shenpan": {
            "bashen": "螣蛇"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天柱",
				"sanqiliuyi": "癸",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "癸"
			},
			"renpan": {
            "bamen": "惊门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得......",
				"luo_gong_desc": "惊门代表外部环境出现的突发的变化或不稳定因素,会......"
			}
		}, {
        "shenpan": {
            "bashen": "太阴"
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "天心",
				"sanqiliuyi": "壬",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "壬"
			},
			"renpan": {
            "bamen": "开门"
			},
			"description": {
            "gong_ju": "伏吟局",
				"gong_ju_desc": "伏吟象征着天地闭合的情景,伏吟多为反复,不得力状态......",
				"luo_gong_desc": "开门象征机遇、财富与事业的信息;因此开门落乾宫,意味着......"
			}
		}, {
        "shenpan": {
            "bashen": ""
			},
			"tianpan": {
            "jiuxing_tianqin_sanqiliuyi": "",
				"jiuxing_tianqin": "",
				"jiuxing": "",
				"sanqiliuyi": "",
				"bashen": ""
			},
			"dipan": {
            "bashen": "",
				"bagua": "",
				"sanqiliuyi": "辛"
			},
			"renpan": {
            "bamen": "中门"
			},
			"description": {
            "gong_ju": "未知局",
				"gong_ju_desc": "不做解析",
				"luo_gong_desc": "中门并非八门之一,而是甲的隐身地,故为遁甲,甲是......"
			}
		}]
	}
}

标签:ch,setopt,排盘,api,error,curl,gateway,CURLOPT,奇门
From: https://www.cnblogs.com/yuanfenju/p/18039128

相关文章

  • 调用百度翻译api
    importrandomimporthashlibimporturllibimportrequestsimportjson#安装相应的库deftrans(word):src='en'#翻译的源语言obj='zh'......
  • Twitter推特 api接口 获取trending趋势搜索关键词 python数据采集
    iDataRiver平台https://www.idatariver.com/zh-cn/提供开箱即用的Twitter公开数据采集API,供用户按需调用。接口使用详情请参考Twitter接口文档接口列表1.获取X/Twitter用户发布的作品列表,支持翻页参数类型是否必填默认值示例值描述apikeystring是idr_***......
  • 支持快速生成API文档: Apipost
    API管理的难点在哪?相信无论是前端,还是后端的测试和开发人员,都遇到过这样的困难。不同工具之间数据一致性非常困难、低效。多个系统之间数据不一致,导致协作低效、频繁出问题,开发测试人员痛苦不堪。开发人员在Swagger定义好文档后,接口调试的时候还需要去Postman再定义一遍。......
  • asp.net quartz 定时器 miniapi sqlite数据库 cors
    dotnet_miniapi_quartz_ipaddress_check/Dtos.csusingSystem.ComponentModel.DataAnnotations;namespaceGameStore.Api.Dtos;publicrecordIpAddressDto(Guidid,stringip,stringname,stringdomain,......
  • C#程序全局异常处理—WPF和Web API两种模式
    C#程序的全局异常处理,网上搜下资料都是一大堆,我这里最近也是独立做一个B/S结构的小项目,后面又增加了需求用WPF实现相同的功能,这里将我所使用的全局异常处理方式做一个简短的总结分享。WebAPI项目的全局异常处理这种项目下,我们可以直接自定义一个全局异常的过滤器,用来处理全局......
  • WebApi项目初始结构简介
    1、launchSettings.json项目的配置文件,包括项目名称、端口号等信息2、依赖项存放项目所需要的一些依赖,例如log3、Controller控制器,可以理解为所有与逻辑相关的东西都在控制器里书写4、配置文件5、程序入口......
  • FastAPI中全局异常处理
    装饰器版本自定义异常1.首先我们定义三个文件,分别为exception.py,main.py,user.py2.自定义异常需要继承HTTPException,该异常可以从fastapi中直接导入fromfastapiimportHTTPException3.exception.py中定义我们业务模块的异常fromfastapiimportHTTPExceptionclassUs......
  • Apipost 数据模型功能API数据重复利用起来
    在Apipost数据模型中用户可以预先创建多个数据模型,并在API设计过程中重复利用这些模型来构建API创建数据模型在左侧导航点击「数据模型」-「新建数据模型」在右侧工作台配置数据模型参数 引入数据模型在API设计预定义响应期望下点击引用数据模型,并选择需要导入的数据模型......
  • 【Flink从入门到精通 02】DataStream API
    【Flink从入门到精通02】DataStreamAPI在之前的文章中,我们介绍了Flink的安装部署、基础概念,今天我们来一起学习Flink的核心之一DataStreamAPI。01分布式流处理基础上图中,我们将整个代码分为了三个部分,即分布式流处理的基本模型:SourceTransformationSink从而,我们可以......
  • DataStream API(三)
    DataStreamAPI(三)目录5.3.4物理分区(PhysicalPartitioning)5.4输出算子(Sink)5.4.1连接到外部系统 5.4.2输出到文件5.4.3输出到Kafka5.4.4 输出到MySQL(JDBC)5.4.5 自定义Sink输出5.5本章总结5.3.4物理分区(PhysicalPartitioning)防止数据倾斜,保证各个分......