本文整理汇总了PHP中SMS::put方法的典型用法代码示例。如果您正苦于以下问题:PHP SMS::put方法的具体用法?PHP SMS::put怎么用?PHP SMS::put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMS
的用法示例。
在下文中一共展示了SMS::put方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SMS
/************************************************************************************
Входные данные
************************************************************************************/
$sms = new SMS();
$sms->smsid = $_REQUEST['smsid'];
$sms->service_phone = $_REQUEST['num'];
$sms->carrier_id = $_REQUEST['operator_id'];
$sms->user_phone = $_REQUEST['user_id'];
$sms->service_earning = doubleval($_REQUEST['cost']);
$sms->msg = $_REQUEST['msg'];
$sms->confidence_rate = $_REQUEST['ran'];
//if (strlen($carrier) == 0)
// $carrier = $_REQUEST['operator'];
$sms->suffix = trim($sms->msg);
if (substr($sms->suffix, 0, strlen(REATESTER_SMS_PREFIX)) != REATESTER_SMS_PREFIX) {
$sms->put(sprintf(SMS_REPLY_INVALID_PREFIX, $sms->suffix));
reply();
}
$sms->suffix = trim(substr($sms->suffix, strlen(REATESTER_SMS_PREFIX)));
$sms->status = SMS_STATUS_PROCESSING;
$sms->put();
/************************************************************************************
Распознавание суффикса
************************************************************************************/
if (strlen($sms->suffix) != REATESTER_SMS_CHAL_LENGTH) {
$sms->status = SMS_STATUS_INVALID_SUFFIX_FORMAT;
$sms->put();
reply(sprintf(SMS_REPLY_WRONG_SUFFIX_FORMAT, $sms->msg));
}
$session = TestSession::get("WHERE sms_chal = ? AND sms_received_at IS NULL AND finished_at >= DATE_SUB(NOW(), INTERVAL " . REATESTER_SMS_CAN_BE_SENT_IN_HOURS . " HOUR)", $sms->suffix);
if (!$session) {