1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
public function send($contents,$config) { $data['account'] = 'sendebang1'; $data['pswd'] = 'Tch91888'; $data['mobile'] = $contents[0]['phones']; $data['msg'] = $contents[0]['content']; $data['needstatus'] = false; $result = $this->httpClient->post('http://222.73.117.158/msg/HttpBatchSendSM',$data); $log = array( "0"=>"提交成功", "101"=>"无此用户", "102"=>"密码错", "103"=>"提交过快(提交速度超过流速限制)", "104"=>"系统忙(因平台侧原因,暂时无法处理提交的短信)", "105"=>"敏感短信(短信内容包含敏感词)", "106"=>"消息长度错", "107"=>"包含错误的手机号码", "108"=>"手机号码个数错", "109"=>"无发送额度(该用户可用短信数已使用完)", "110"=>"不在发送时间内", "111"=>"超出该账户当月发送额度限制", "112"=>"无此产品,用户没有订购该产品", "113"=>"extno格式错(非数字或者长度不对)", "115"=>"自动审核驳回", "116"=>"签名不合法,未带签名(用户必须带签名的前提下)", "117"=>"IP地址认证错,请求调用的IP地址不是系统登记的IP地址", "118"=>"用户没有相应的发送权限", "119"=>"用户已过期", "120"=>"测试内容不是白名单" ); $result = explode(',', $result); logger::info("messenger_sms_result:".$log[$result[1]]); if($result[1]=='0') { $msg = app::get('system')->_('短信发送成功!'); return true; }else{ $msg = app::get('system')->_('短信发送失败!'); throw new \LogicException($msg); return false; } } |
2016年12月10日 10:55 沙发
进来看看
2016年12月10日 19:47 1层
@春熙路 亲,茫茫站海中你是怎么找到我的。。