本文整理汇总了PHP中DBAccess::save_messages方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAccess::save_messages方法的具体用法?PHP DBAccess::save_messages怎么用?PHP DBAccess::save_messages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBAccess
的用法示例。
在下文中一共展示了DBAccess::save_messages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
#%C message charset
#%i the smsc-id of the connection that received the message
# received.php %p %C %i %a
# 1 2 3 4
# insert to database received sms
$d['body'] = trim(urldecode($argv[4]));
$d['msisdn'] = $db->num_format(urldecode($argv[1]));
$smsc = urldecode($argv[3]);
$d['smsc'] = $smsc == 'auto' ? false : $smsc;
$d['charset'] = urldecode($argv[2]);
//$d['created_at']= "NOW()";
$num = $d['msisdn'];
if ($num == "7210") {
exit;
} else {
$db->save_messages($d);
$data = $db->get_member($d['msisdn']);
//echo $d['message'];
# pattern to check for possible command case insensitive
$pattern = '/^(.+?),(.*)/i';
if (preg_match($pattern, $d['body'], $m)) {
$command = $db->get_pattern($m[1]);
$d['message'] = trim($m[2]);
$db->log_debug($m, "pattern-> ");
} else {
#$db->send_sms($d['msisdn'], $db->get_tmpl('invalid'), $d['smsc']);
$command = $db->get_pattern($d['body']);
if ($command) {
$db->log_debug($command, "pattern-> ");
switch ($command) {
case 'help reply':