本文整理汇总了PHP中Sms::send_sms_post方法的典型用法代码示例。如果您正苦于以下问题:PHP Sms::send_sms_post方法的具体用法?PHP Sms::send_sms_post怎么用?PHP Sms::send_sms_post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sms
的用法示例。
在下文中一共展示了Sms::send_sms_post方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
if (C('SMS_SEND')) {
if (in_array("sms", $type_arr)) {
$r = $noticeApiCurd->actSmsSurNum($from);
$flag = $r['ret'];
if ($flag == "ok") {
//2014/08/19 判断是否可发送
$table = "nt_sms";
//单条发送消息start
foreach ($to_detail as $to_detail_val) {
$to_name = $to_detail_val['to_name'];
if (in_array($to_name, $noMobile)) {
continue;
}
$to_mobile = $to_detail_val['to_mobile'];
$to_login_name = $to_detail_val['to_login_name'];
$res_sms = Sms::send_sms_post($to_mobile, $content . "【华成云商】", '');
$status = substr($res_sms, 0, strpos($res_sms, "/"));
//000 短信表示成功
if ($status !== '000') {
$smSendFail[] = $to_name;
}
$data = array("from_mobile" => $from_mobile, "to_mobile" => $to_mobile, "content" => post_check($content), "from_name" => $from, "to_name" => $to_name, "addtime" => time(), "status" => $status, "from_login_name" => $from_login_name, "to_login_name" => $to_login_name, "client_ip" => $client_ip);
$result = $noticeApiCurd->actInsert($data, $table);
}
//单条发送消息end
} else {
$sms_stop = true;
}
}
} else {
$sms_send = false;