| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php/*** * User: jun_hy * Date: 2022/7/6 * Time: 16:11 */require_once('class.mysql.php');require_once('/www/wwwroot/edm.alipearl.net/frame/alisms.php');//require_once('../frame/alisms.php');set_time_limit(1800);$dbms = 'mysql';$host = 'localhost';$DB_Database = $dbName = 'edm_alipearl_net';$user = 'edm_alipearl_net';$pass = '6fP8Pf6dLdmFBYR4';$db_charset = "utf8";$db = new Daopdo($host, $user, $pass, $dbName, $db_charset);$sql['email_data'] = 'SELECT `id`,`params_json` FROM `ly_sms_data_tmp` ORDER BY `id` ASC LIMIT 1;';$email_data = $db->query($sql['email_data'], 'Row');if (empty($email_data)) {    exit(0);} else {    $sql['delQueueHead'] = "DELETE FROM `ly_sms_data_tmp` WHERE `id`='{$email_data['id']}';";    $db->query($sql['delQueueHead']);}$params = unserialize($email_data['params_json']);$mobiles =$params['to'];foreach ($mobiles as $k=>$v){    $mobile = $v['mobile'];    $from = $v['from_name'];    sendSmsali($mobile,$params['template_body'],$from);    $times=date('Y-m-d H:i:s',time());    $sql['insert_log'] = 'INSERT INTO `ly_send_sms_log` (`mobile`,`addtime`,`template_id`,`template_body`,`from_name`,`uid`) VALUES ';    $sql['insert_log'] .= "('{$mobile}','{$times}','{$params['template_id']}','{$params['template_body']}','{$from}','{$params['uid']}');";    $insert_log = $db->query($sql['insert_log']);}echo 'success';
 |