/** * @发短信 *免申模板 'content' => '您的账号123,密码是987,欢迎您注册i代言。【i代言】', */ public function HttpSend() { if (is_array($this->mobile)) { $phone = implode(',', $mobile); } else { $phone = $this->mobile; //检测 发送频率 if (!$this->checkRate($phone)) { return '发送频率太高'; } } $sendcontent = array('name' => Sms::CHUANGRUI_NAME, 'pwd' => Sms::CHUANGRUI_PWD, 'content' => $this->content, 'mobile' => $phone, 'stime' => $this->stime, 'sign' => '', 'type' => Sms::CHUANGRUI_TYPE, 'extno' => ''); $result = PublicLibrary::do_request(Sms::CHUANGRUI_URL, $sendcontent); $result = explode(',', $result); //写入日志 $smslog_model = new SmsLog(); $log = array('mobile' => $phone, 'status' => $result[0] == 0 ? 0 : 1, 'errorcode' => $result[0], 'errorinfo' => $result[0] != 0 ? $result[1] : '', 'sendmessage' => $this->content, 'from' => $this->from, 'client_info' => $this->client_info); $logreturn = $smslog_model->saveLog($log); return $result[0]; }