奇门排盘 API接口

接口数据api

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

开发文档https://doc.yuanfenju.com/liupan/qimendunjia.html

支持格式:JSON

请求方式:HTTP 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_
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值