首页 > 代码库 > 阿里大鱼
阿里大鱼
1 $type = "SMS_53840088"; 2 $signName = ‘注册验证‘; 3 $param = json_encode(array(‘code‘=>$data[‘rand_num‘],‘product‘=>$data[‘projectName‘])); 4 $return = $messages->stort_message($type,$data[‘tel‘],$signName,$param);
1 <?php 2 class message 3 { 4 public function stort_message($type,$tel,$signName,$param) 5 { 6 require PIGCMS_CORE_PATH."libs/org/Alidayu/TopSdk.php"; 7 date_default_timezone_set(‘Asia/Shanghai‘); 8 $c = new TopClient; 9 $c->appkey = ‘23694723‘; 10 $c->secretKey = ‘a5e4dd4fb0a6235a852887288f13d666‘; 11 $req = new AlibabaAliqinFcSmsNumSendRequest; 12 $req->setExtend(""); 13 $req->setSmsType("normal"); 14 $req->setSmsFreeSignName($signName); 15 $req ->setSmsParam($param); 16 $req->setRecNum($tel); 17 $req->setSmsTemplateCode($type); 18 $resp = $c->execute($req); 19 $return=json_decode( json_encode( $resp),true); 20 if($return[‘result‘][‘success‘] == "true" && $return[‘result‘][‘err_code‘]==0){ 21 return true; 22 }else{ 23 return false; 24 } 25 26 } 27 28 }
阿里大鱼
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。