function send_sms($phone_number, $message) { // Initialize the SMS Library $objIntelliSMS = new IntelliSMS(); // Set your username and passsword $objIntelliSMS->Username = '******'; $objIntelliSMS->Password = '******'; //Break Phone number to International Format $number = "+94" . substr($phone_number, 1); //Send end SMS $SendStatusCollection = $objIntelliSMS->SendMessage($number, $message, 'ecole'); // Return the status return $SendStatusCollection; }
public function intellisms($to, $message) { if ($this->settings['intellismsUserName'] == "" || $this->settings['intellismsPassword'] == "" || $this->settings['intellismsSenderNumber'] == "") { return; } $objIntelliSMS = new IntelliSMS(); $objIntelliSMS->Username = $this->settings['intellismsUserName']; $objIntelliSMS->Password = $this->settings['intellismsPassword']; $objIntelliSMS->SendMessage($to, $message, $this->settings['intellismsSenderNumber']); }
include 'IntelliSms.php'; //Required php.ini settings: // allow_url_fopen = On // track_errors = On // //NOTE: To use https you will need the OpenSSL extension module $sendresult_detailed = ""; $sendresult_summary = ""; if (isset($_POST['recipients']) && strlen($_POST['recipients']) != 0 && isset($_POST['message'])) { $objIntelliSMS = new IntelliSMS(); //Set you account login details below: $objIntelliSMS->Username = '******'; $objIntelliSMS->Password = '******'; $objIntelliSMS->MaxConCatMsgs = $_POST['maxconcat']; //Send message $SendStatusCollection = $objIntelliSMS->SendMessage($_POST['recipients'], $_POST['message'], $_POST['from']); //Generate result summaries for display in browser $sendresult_detailed = "<b>Result Details:</b><br>"; $sendcount = 0; foreach ($SendStatusCollection as $SendStatus) { $sendresult_detailed = $sendresult_detailed . $SendStatus["To"] . " " . $SendStatus["MessageId"] . " " . $SendStatus["Result"] . "<BR>"; if ($SendStatus["Result"] == "OK") { $sendcount++; } } $sendresult_summary = $sendcount . " out of " . count($SendStatusCollection) . " messages have been sent ok"; } ?>