function send_sms($TemplateCode,$RecNum,$FreeSignName){ $c = new TopClient; $c->appkey = ;//appkey值 $c->secretKey = ;//secretKey值 $req = new AlibabaAliqinFcSmsNumSendRequest; //$req->setExtend("123456"); $req->setSmsType("normal"); $req->setSmsFreeSignName($FreeSignName); $req->setSmsParam("{"code":"1234","product":"alidayu"}");.//模版参数 $req->setRecNum($RecNum); $req->setSmsTemplateCode($TemplateCode); $resp = $c->execute($req); $content = json_decode(json_encode($resp),true); try { $result= $content['sub_msg']; throw new Exception('It is an exception!'); } catch (Exception $e) { if( $content['result']['success'] == 'true' ){ $result= '发送成功'; }else{ $result= '发送失败'; } } echo $result; exit(); } |
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: dedecms使用整合阿里大鱼短信接口进行短信发送的教程