예제 #1
0
 public function inform_insert_client($data, $msg, $term_num)
 {
     $adder = $this->db->prepare("INSERT INTO msg_details (number,message,termid)\n                        VALUES(:number,:message,:termid)");
     $adder->execute(array(':number' => $data, ':message' => $msg, 'termid' => $term_num));
     include "public/sms/src/NexmoMessage.php";
     $nexmo_sms = new NexmoMessage('32a68cfb', '597cecf7');
     $info = $nexmo_sms->sendText($data, 'TrainXLIfe', $msg);
     echo $nexmo_sms->displayOverview($info);
 }
예제 #2
0
<?php

include "NexmoMessage.php";
/**
 * To send a text message.
 *
 */
// Step 1: Declare new NexmoMessage.
$nexmo_sms = new NexmoMessage('api_key', 'api_secret');
// Step 2: Use sendText( $to, $from, $message ) method to send a message.
$info = $nexmo_sms->sendText('+447234567890', 'MyApp', 'Hello!');
// Step 3: Display an overview of the message
echo $nexmo_sms->displayOverview($info);
// Done!
예제 #3
0
 public function SendSms($contact)
 {
     include "/libs/sms/src/NexmoMessage.php";
     $newCon = substr($contact, 1);
     // Step 1: Declare new NexmoMessage.
     $nexmo_sms = new NexmoMessage('e3a975e2', 'ffdd4630');
     // Step 2: Use sendText( $to, $from, $message ) method to send a message.
     $info = $nexmo_sms->sendText('+94' . $newCon, 'IOC', 'Dear Customer your Carwash service is done. You can collect your vehicle at our service station. Thank You for using our service.');
     // Step 3: Display an overview of the message
     echo $nexmo_sms->displayOverview($info);
     // Done!
 }