当前位置: 首页>>代码示例>>PHP>>正文


PHP sendSMS函数代码示例

本文整理汇总了PHP中sendSMS函数的典型用法代码示例。如果您正苦于以下问题:PHP sendSMS函数的具体用法?PHP sendSMS怎么用?PHP sendSMS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sendSMS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: send

 public static function send($content, $mobile)
 {
     require_once 'sender_qixintong.php';
     //即时发送
     $res = sendSMS(self::uid, self::pwd, $mobile, $content);
     return $res;
 }
开发者ID:DaiDanRui,项目名称:LinHang,代码行数:7,代码来源:MessageSender.php

示例2: getSmsCode

 /**
  * 根据注册用户的手机号,获取手机验证码
  * @param $tel
  */
 public function getSmsCode($tel)
 {
     //生成随机的短信验证码
     $smsCode = \Org\Util\String::randNumber(1000, 9999);
     //将手机验证码存入redis中,当前手机号作为键.用作后面的验证
     S($tel, $smsCode, 60);
     //发送验证信息
     sendSMS('注册验证', '{"code":"' . $smsCode . '","product":"京西商城"}', $tel, 'SMS_4730837');
 }
开发者ID:cooliter,项目名称:shop0114,代码行数:13,代码来源:MemberController.class.php

示例3: getSMSCode

 /**
  * 获取短信的验证码
  * @param $tel
  */
 public function getSMSCode($tel)
 {
     //随机码
     $str = String::randNumber(1000, 9999);
     //>>1.将验证码保存到redis中.保存30秒
     S($tel, $str, 300);
     //>>2.发送短信
     sendSMS('注册验证', '{"code":"' . $str . '","product":"京西商城"}', $tel, 'SMS_2245271');
 }
开发者ID:okiter,项目名称:php1009,代码行数:13,代码来源:MemberController.class.php

示例4: send

 function send()
 {
     sendSMS(array($this->phone), $this->message, $this->w->Auth->user()->login);
     // always store a fresh line item
     $this->dt_created = null;
     $this->creator_id = null;
     $this->id = null;
     $this->insert();
 }
开发者ID:itillawarra,项目名称:cmfive,代码行数:9,代码来源:Sms.php

示例5: send_sms_code

function send_sms_code($mobile, $str)
{
    $uid = '57141';
    //用户账号
    $pwd = 'd6m574';
    //密码
    $content = $str . ',请不要把验证码泄露给其他人。如非本人操作,可不用理会。【阿依达商贸】';
    //内容
    //即时发送
    return sendSMS($uid, $pwd, $mobile, $content);
}
开发者ID:nongfuguoyuan,项目名称:accountant,代码行数:11,代码来源:sendsms.php

示例6: SMSSend

function SMSSend($mobile, $content, $mobileids = '', $time = '', $mid = '')
{
    $http = 'http://api.sms.cn/mtutf8/';
    //短信接口
    $uid = 'chaoweichuangyuan';
    //用户账号
    $pwd = 'ChaoweiUct';
    //密码
    $mobileids = $mobile . (string) rand(1000, 9999);
    return sendSMS($http, $uid, $pwd, $mobile, $content, $mobileids, $time, $mid);
}
开发者ID:magiclake,项目名称:chaowei,代码行数:11,代码来源:send.php

示例7: sms_send_yimei

function sms_send_yimei($phone, $content) {
		//global $INI;
	$content = $content."【米粒团】";//短信签名自己修改
	$smslog = sms_deal($phone,$content);
	if(!$smslog){
		$res = '111';//表示发送的短信信息存入数据库失败,不执行发送请求
	}else{
		$res = sendSMS(array($phone),$content);
	}
	return trim(strval($res))=='0' ? true : strval($res);
}
开发者ID:noikiy,项目名称:mdwp,代码行数:11,代码来源:sms.php

示例8: send_text

 public static function send_text()
 {
     // Simple SMS send function
     function sendSMS($username, $password, $to, $message, $originator)
     {
         $URL = 'http://api.textmarketer.co.uk/gateway/' . "?username={$username}&password={$password}&option=xml";
         $URL .= "&to={$to}&message=" . urlencode($message) . '&orig=' . urlencode($originator);
         $fp = fopen($URL, 'r');
         return fread($fp, 1024);
     }
     // Example of use
     $response = sendSMS('myUsername', 'myPassword', '4477777777', 'My test message', 'TextMessage');
     echo $response;
 }
开发者ID:stephenx99,项目名称:xframe,代码行数:14,代码来源:Lib.php

示例9: sendSMS

 function sendSMS($mobileNumber, $notificationText)
 {
     //#############################################################
     $baseURL = "https://enabler.intelligentcloud.biz/SendSmsService/OneAPI_REST_v1_0/routing";
     $version = "1";
     $relativeURL = "/" . $version . "/smsmessaging/outbound/" . urlencode($this->smsNumber) . "/requests";
     $urlString = $baseURL . $relativeURL;
     $data = array('address' => urlencode($mobileNumber), 'senderAddress' => urlencode($this->smsNumber), 'message' => urlencode($notificationText));
     $data_string = "";
     foreach ($data as $key => $value) {
         $data_string .= $key . '=' . $value . '&';
     }
     rtrim($data_string, '&');
     $obj = json_decode(sendSMS($urlString, $data_string));
     if (property_exists($obj, 'requestError')) {
         //do something, log error.
     } else {
         $confirmationURL = $obj->{'resourceReference'}->{'resourceURL'} . "/deliveryInfos";
         $this->followupSMS($confirmationURL);
     }
 }
开发者ID:fniftaly,项目名称:Java-Selenium,代码行数:21,代码来源:SMS.php

示例10: sendSMSAlert

function sendSMSAlert($geoAssId, $devDateTime)
{
    $db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
    $db->connect();
    $getData = "SELECT * FROM tb_assigngeofence,tb_deviceinfo,tb_geofence_info,tb_clientinfo WHERE ci_id = tag_clientId AND tgi_id = tag_geofenceId AND di_id = tag_diId AND tag_id = " . $geoAssId;
    $resData = mysql_query($getData);
    if (@mysql_affected_rows() > 0) {
        $fetData = mysql_fetch_assoc($resData);
        $from = "";
        $to = $fetData[tag_alertSrc];
        if ($fetData[di_deviceName]) {
            $devName = $fetData[di_deviceName];
        } else {
            $devName = $fetData[di_deviceId];
        }
        if ($fetData[tag_inout] == "in") {
            $status = "entered zone";
        } else {
            $status = "left zone";
        }
        $msg = "Dear " . ucfirst($fetData[ci_clientName]) . "! " . $devName . " has " . $status . " " . $fetData[tgi_name] . " at " . date("H:i:s", strtotime($devDateTime)) . " - " . $fetData[ci_weburl];
        //echo $msg;
        $smsres = sendSMS($from, $to, $msg);
        $smsdata['tsi_mobileno'] = $fetData[tag_alertSrc];
        $smsdata['tsi_tgai_id'] = $geoAssId;
        $smsdata['tsi_smsResult'] = $smsres;
        $smsdata['tsi_message'] = urlencode($msg);
        $smsdata['tsi_smsType'] = "GEOALERT";
        //print_r($smsdata);
        //exit;
        if ($db->query_insert("tb_smsinfo", $smsdata)) {
            $res = 1;
        } else {
            $res = 0;
        }
        return $res;
        //print_r($fetData);
    }
}
开发者ID:shameerariff,项目名称:gpsapps,代码行数:39,代码来源:smsSF.php

示例11: register

function register($fname, $lname, $email, $pass, $phone, $plan)
{
    //header('Location: '.get_bloginfo('url').'/?p=r&status=good&f='.$fname.'&u='.$username.'&e='.$email.'$p='.$phone.'&pl='.$plan);
    global $wpdb;
    $username = strtolower(substr($fname, 0, 1) . $lname);
    # start by checking if the user already exists
    $row = $wpdb->get_row("SELECT * FROM userinfo WHERE username ='{$username}' OR email = '{$email}'");
    if (!empty($row->username)) {
        header('Location: ' . get_bloginfo('url') . '/?p=r&status=bad');
    } else {
        $sql = "INSERT INTO userinfo(username,firstname,lastname,email,mobilephone) \n            \t\tVALUES('{$username}','{$fname}', '{$lname}', '{$email}', '{$phone}')";
        $sql1 = "INSERT INTO radcheck(username,attribute,op,value)\n\t\t\t\t\t VALUES('{$username}','Cleartext-Password',':=','{$pass}')";
        $date = date('d M Y', strtotime(date('d M Y') . ' +2 day'));
        $sql2 = "INSERT INTO radcheck(username,attribute,op,value)\n\t\t\t\t\t VALUES('{$username}','Expiration',':=','{$date}')";
        $sql3 = "INSERT INTO radusergroup(username,groupname)\n\t\t\t\t\tVALUES('{$username}','{$plan}')";
        $wpdb->query($sql);
        $wpdb->query($sql1);
        $wpdb->query($sql2);
        $wpdb->query($sql3);
        sendSMS($phone, $username, $pass);
        sendEmail($email, $username, $plan);
        header('Location: ' . get_bloginfo('url') . '/?p=r&status=good&f=' . $fname . '&u=' . $username . '&e=' . $email . '$p=' . $phone . '&pl=' . $plan . '&ps=' . $pass);
    }
}
开发者ID:webnerd15,项目名称:WP-RADIUS,代码行数:24,代码来源:processor.php

示例12: getListInvalidFutureBuyingOrder

 function getListInvalidFutureBuyingOrder($OrderDate, $StockExchangeID)
 {
     // End 20100723 - Them $StockExchangeID ------------------------------------------------------- //
     $function_name = 'getListInvalidFutureBuyingOrder';
     $struct = '{urn:' . $this->class_name . '}' . $function_name . 'Struct';
     if (authenUser(func_get_args(), $this, $function_name) > 0) {
         return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
     }
     if (!required($OrderDate)) {
         $this->_ERROR_CODE = 30480;
     } elseif (!required($StockExchangeID)) {
         $this->_ERROR_CODE = 30001;
     } else {
         // $query = sprintf( "CALL sp_getListInvalidFutureBuyingOrder('%s' )", $OrderDate );
         $query = sprintf("CALL sp_getListInvalidFutureBuyingOrder('%s', '%s' )", $OrderDate, $StockExchangeID);
         $rs = $this->_MDB2_WRITE->extended->getAll($query);
         $this->_MDB2_WRITE->disconnect();
         $count = count($rs);
         for ($i = 0; $i < $count; $i++) {
             // 20100723 - Quang change ---------------------------------
             // $vip = checkVIPAccount($AccountNo);// 1: exist 0: not exist
             $vip = checkVIPAccount($rs[$i]['accountno']);
             // 1: exist 0: not exist
             // End 20100723 - Quang change -----------------------------
             if (strpos(PAGODA_ACCOUNT, $rs[$i]['accountno']) === false && $vip == 0) {
                 if ($rs[$i]['ordersideid'] == ORDER_BUY) {
                     switch ($rs[$i]['bankid']) {
                         case DAB_ID:
                             $dab =& new CDAB();
                             $dab_rs = $dab->cancelBlockMoney($rs[$i]['bankaccount'], $rs[$i]['accountno'], $rs[$i]['id'], $rs[$i]['amount']);
                             break;
                         case VCB_ID:
                             $dab =& new CVCB();
                             $newOrderID = $rs[$i]['id'] . $rs[$i]['unitcode'];
                             $dab_rs = $dab->cancelBlockMoney($rs[$i]['accountno'], $newOrderID, $rs[$i]['amount']);
                             break;
                         case NVB_ID:
                             $dab =& new CNVB();
                             $dab_rs = $dab->cancelBlockMoney(substr($rs[$i]['id'] . date("His"), 3), $rs[$i]['bankaccount'], $rs[$i]['amount'], $rs[$i]['id']);
                             break;
                         case OFFLINE:
                             $query = sprintf("CALL sp_VirtualBank_Cancel('%s', %u, %u, %f, '%s')", $rs[$i]['accountno'], OFFLINE, $rs[$i]['id'], $rs[$i]['amount'], $function_name);
                             $this->_MDB2_WRITE->connect();
                             $off_rs = $this->_MDB2_WRITE->extended->getRow($query);
                             $this->_MDB2_WRITE->disconnect();
                             $dab_rs = $off_rs['varerror'];
                             break;
                     }
                     // switch
                     if ($dab_rs == 0) {
                         $success = 1;
                     } else {
                         $success = 0;
                     }
                     $this->_MDB2_WRITE->connect();
                     $query = sprintf("CALL sp_updateFromApprovedToDeniedForFutureBuyingOrder( %u, %u )", $rs[$i]['id'], $success);
                     $update_rs = $this->_MDB2_WRITE->extended->getRow($query);
                     $this->_MDB2_WRITE->disconnect();
                 }
                 // BUY order
                 $bank_result .= $rs[$i]['accountno'] . "   " . $rs[$i]['id'] . "   " . $rs[$i]['amount'] . " --> " . $dab_rs . "\r\n";
                 $arraySMS['Phone'] = $rs[$i]['mobilephone'];
                 $OrderSide = $rs[$i]['ordersideid'] == ORDER_BUY ? "Mua" : "Ban";
                 $arraySMS['Content'] = "EPS: Lenh " . $OrderSide . " " . $rs[$i]['symbol'] . " - TK: " . $rs[$i]['accountno'] . " khong hop le do sai gia Tran/San";
                 sendSMS($arraySMS);
             }
             // PAGODA_ACCOUNT
         }
         // for
         mailSMTP('Quản lý Đặt lệnh', 'webmaster@eps.com.vn', 'quan.l@eps.com.vn', 'ba.nd@eps.com.vn', '', 'Danh sách lệnh đặt trước không hợp lệ - StockExchangeID:' . $StockExchangeID, 'Danh sách lệnh đặt trước không hợp lệ \\r\\n <br>' . $bank_result);
         // mailSMTP('Quản lý Đặt lệnh','webmaster@eps.com.vn','quang.tm@eps.com.vn','quang.tm@eps.com.vn', '', 'Danh sách lệnh đặt trước không hợp lệ - StockExchangeID:'.$StockExchangeID,'Danh sách lệnh đặt trước không hợp lệ \r\n <br>'.$bank_result);
         $filename = $_SERVER['DOCUMENT_ROOT'] . "/bank/unlock/" . date("Ymd");
         file_put_contents($filename, $bank_result);
     }
     return returnXML(func_get_args(), $this->class_name, $function_name, $this->_ERROR_CODE, $this->items, $this);
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:76,代码来源:classOrder.php

示例13: number_format

        $cat_2 = $examTypeMarks_->cat2Marks($term_id, $stud_id, $subject_id);
        $mid_term = $examTypeMarks_->midtermMarks($term_id, $stud_id, $subject_id);
        $end_term = $examTypeMarks_->endtermMarks($term_id, $stud_id, $subject_id);
        $average = $examTypeMarks_->averageGrade($term_id, $stud_id, $subject_id);
        $average = number_format($average['key1'], 1);
        $grade = $average['key2'];
        $classPosition = $examTypeMarks_->classPosition($term_id, $stud_id, $subject_id);
        $message_part2_ = strtoupper(substr($subject_name, 0, 3)) . ' :' . $average . $grade;
        $message_part2 = $message_part2 . '; ' . $message_part2_;
    }
    //end while
} else {
    echo 'No details for now.';
}
$total_Avg = number_format($total, 2);
$studentProfile_ = new studentProfile();
$meanPoints = $studentProfile_->studMeanPoints($stud_id, $term_id);
$meanPoints = $meanPoints['key2'];
$studentPosition = $studentProfile_->studentPosition($term_id, $stud_id);
$message_part3 = 'TOTAL:' . $total . ' MEAN POINTS:' . $meanPoints . ' PST:' . $studentPosition;
$message_part1 = 'NAME: ' . $fname . ' ' . $mname . ' ' . $lname . ' ' . $adminNo . ' ' . $class_name . ' ' . $term_name . ' :' . $year_name;
$message = $message_part1 . ' ' . $message_part2 . ' ' . $message_part3 . ' Sent from Nyandarua High School';
echo $message;
function sendSMS($number, $message)
{
    $Namba = urlencode($number);
    $Message = urlencode($message);
    file("http://localhost:8011/send/sms/" . $Namba . "/" . $Message . "/");
}
sendSMS($number, $message);
echo 'message sent';
开发者ID:GotaloveCode,项目名称:sms,代码行数:31,代码来源:test_sms.php

示例14: doSendVerify

 public function doSendVerify($account, $verify, $type)
 {
     switch ($type) {
         case 'mobile':
             $content = modC('SMS_CONTENT', '{$verify}', 'USERCONFIG');
             $content = str_replace('{$verify}', $verify, $content);
             $content = str_replace('{$account}', $account, $content);
             $res = sendSMS($account, $content);
             return $res;
             break;
         case 'email':
             //发送验证邮箱
             $content = modC('REG_EMAIL_VERIFY', '{$verify}', 'USERCONFIG');
             $content = str_replace('{$verify}', $verify, $content);
             $content = str_replace('{$account}', $account, $content);
             $res = send_mail($account, modC('WEB_SITE_NAME', 'OpenSNS开源社交系统', 'Config') . '邮箱验证', $content);
             return $res;
             break;
     }
 }
开发者ID:smartymoon,项目名称:e-anjia,代码行数:20,代码来源:ConfigController.class.php

示例15: tach_send_callback

function tach_send_callback()
{
    global $panda;
    $ok = !empty($panda['ok_ok']) ? esc_url($panda['ok_ok']) : 'javascript:void(0);';
    $vk = !empty($panda['vk_vk']) ? esc_url($panda['vk_vk']) : 'javascript:void(0);';
    check_ajax_referer('cr-special-string', 'security');
    $phone = $_POST['phone'];
    $name = $_POST['name'];
    $text = $_POST['text'] ? $_POST['text'] : '';
    $email = !empty($panda['e_mail']) ? $panda['e_mail'] : '';
    $defaults = array('post_title' => 'Заявка на подбор репетитора c id' . $text, 'post_content' => $phone . '<br>' . $name, 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'send');
    $post_id = wp_insert_post($defaults);
    wp_mail($email, 'Заявка на подбор репетитора ' . get_home_url(), 'Вы получили новую заявку на подбор репетитора № ' . $post_id . ' Телефон клиента ' . $phone . ', Имя клиента, ' . $name . ', Репетитор -  ' . $text);
    $texte = "Садись, 5!: Ваша заявка №" . $post_id . " получена. Мы свяжемся с Вами. Наш тел: 412-413";
    sendSMS($phone, $texte);
    $date = date('G');
    if ($date > 21 && $date < 8) {
        $mess = '<br>Мы свяжемся с вами после 8:00 утра';
    } else {
        $mess = '';
    }
    echo '<a href="#" class="close"></a>
        <div class="litebox-top">Отлично!</div>
        <div class="popup-content">
            <div class="litebox-blod litebox-blod2">
                ' . $name . ', ваша заявка № ' . $post_id . ' получена. Мы перезвоним,<br>
                уточним детали и бесплатно подберем <br>
                подходящего специалиста.' . $mess . '
            </div>
            <div class="litebox-text">
                А пока подпишитесь на наши группы в социальных сетях,<br>
                чтобы узнавать новости из сферы образования и оставаться <br>
                в хорошем настроении!
            </div>
            <div class="popup-sots">
                <a href="' . $vk . '" class="vk-link2">Вконтакте</a>
                <a href="' . $ok . '" class="odnoklasniki-link2">Одноклассники</a>
            </div>
        </div>';
    wp_die();
}
开发者ID:WP-Panda,项目名称:crrepetitor,代码行数:41,代码来源:action-send-mailes.php


注:本文中的sendSMS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。