PHP商城对接【三网106短信】短信接口-短信验证码-短信通知-数字藏品短信-短信API_支持转网_自定义签名模板

AppKey:204513492
AppSecret:zMiHLtCY9mgZPMyRltPRZWENqxWGH1EP
AppCode:3e10d683a12e43b28b22c9f3530212e5


    $host = "https://gyytz.market.alicloudapi.com";
    $path = "/sms/smsSend";
    $method = "POST";
    $appcode = "你自己的AppCode";
    $headers = array();
    array_push($headers, "Authorization:APPCODE " . $appcode);

//smsSignId(短信前缀)和templateId(短信模板),可登录国阳云控制台自助申请。参考文档:http://help.guoyangyun.com/Problem/Qm.html

    $querys = "mobile=mobile¶m=**code**%3A12345%2C**minute**%3A5&smsSignId=2e65b1bb3d054466b82f0c9d125465e2&templateId=908e94ccf08b4476ba6c876d13f084ad";
    $bodys = "";
    $url = $host . $path . "?" . $querys;

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, true);  //如果只想获取返回参数,可设置为false
    if (1 == strpos("$".$host, "https://"))
    {
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    }
    var_dump(curl_exec($curl));
?>

你可能感兴趣的:(阿里云短信对接,三网106短信对接,短信验证码php开发,短信API,阿里云短信账号,阿里云短信API,阿里云短信签名模板代理申请)