本文整理匯總了PHP中Sms::SendSms方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sms::SendSms方法的具體用法?PHP Sms::SendSms怎麽用?PHP Sms::SendSms使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sms
的用法示例。
在下文中一共展示了Sms::SendSms方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: duanxin
public function duanxin()
{
$data = $this->View('public');
$start = $this->input->get_post('start');
$offset = $this->input->get_post('offset');
$step = 1;
if (empty($start)) {
$start = '0';
$offset = $step;
}
$uId = $this->input->get_post('str');
$con = $this->input->get_post('content');
$uIdArr = explode('-', base64_decode($uId));
$countNum = count($uIdArr);
$content = base64_decode(str_replace(" ", "+", $con));
$this->load->library('sms');
foreach ($uIdArr as $value) {
$uIdStr .= $value . ',';
}
$uIdStr = rtrim($uIdStr, ',');
$arr_phone = $this->EmailModel->emailPhoneNews($uIdStr);
foreach ($arr_phone as $key => $val) {
if ($key >= $start && $key < $offset) {
if (!empty($val["phone"])) {
$res = Sms::SendSms($val["phone"], $content);
if (strpos($res, 'Result=0') === false) {
continue;
}
}
}
$start += $step;
$offset += $step;
if ($offset > $countNum) {
$this->showMsg(1, '短信發送成功', '/public/EmailController/emailListView/');
exit;
} else {
header("Location: http://erm.xkhouse.com/index.php/public/EmailController/duanxin/?start={$start}&offset={$offset}&str={$uId}&content={$con}");
}
}
}