示例#1
0
function sendsms($mobile, $send_txt, $tplid = 1, $id_code = '', $siteid = 1)
{
    pc_base::load_app_class('smsapi', 'sms', 0);
    //引入smsapi类
    $sms_setting = getcache('sms', 'sms');
    $sms_uid = $sms_setting[$siteid]['userid'];
    //短信接口用户ID
    $sms_pid = $sms_setting[$siteid]['productid'];
    //产品ID
    $sms_passwd = $sms_setting[$siteid]['sms_key'];
    //32位密码
    $smsapi = new smsapi($sms_uid, $sms_pid, $sms_passwd);
    //初始化接口类
    $mobile = explode(',', $mobile);
    $code = $smsapi->send_sms($mobile, $send_txt, 0, CHARSET, $id_code, $tplid, 1);
    //发送短信
    if ($code == 0) {
        return 0;
    } else {
        return sms_status($code, 1);
    }
}
示例#2
0
 /**
  * 
  * 接口短信状态
  */
 private function _sms_status()
 {
     pc_base::load_app_func('global', 'sms');
     return sms_status(0, 1);
 }
示例#3
0
            echo iconv('utf-8', 'gbk', $info['msg']);
        } else {
            echo $info['msg'];
        }
        ?>
</td>
	<td width="10%" align="center"><?php 
        echo $info['sms_uid'];
        ?>
</td>	
	<td width="15%" align="center"><?php 
        echo $info['return_id'];
        ?>
</td>
	<td width="5%" align="center"><?php 
        echo sms_status($info['status']);
        ?>
</td>
	<td width="10%" align="center"><?php 
        echo $info['ip'];
        ?>
</td>
	<td width="20%" align="center"><?php 
        echo format::date($info['posttime'], 1);
        ?>
</td>
	</tr>
<?php 
    }
}
?>
示例#4
0
            for ($j = 0; $j < count($status); $j++) {
                ?>
								<span style="display: block;"><?php 
                echo $status[$j]->recipient;
                ?>
</span>
							<?php 
            }
            ?>
							</td>
							<td>
							<?php 
            for ($j = 0; $j < count($status); $j++) {
                ?>
								<span style="display: block;"><?php 
                echo sms_status($status[$j]->status);
                ?>
</span>
							<?php 
            }
            ?>
							</td>
						</tr>
						<?php 
        }
        ?>
						<?php 
    }
    ?>
					</tbody>
				</table>