1. Go to this page and download the library: Download savannabits/movesms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
savannabits / movesms example snippets
$username = "YOUR MOVETECH USERNAME";
$senderId = "YOUR MOVETECH SENDER ID";
$apiKey = "YOUR MOVETECH API KEY";
$recipients = ["+254xxxxxx"]; //Array of recipient phone numbers in international format
$message = "Hello World! Here is my message.";
$res = Savannabits\Movesms\Movesms::init($username,$apiKey, $senderId)
->to($recipients)
->message($message)
->send();
// Returns a php object with the following format:
$res = [
"success" => true, //boolean
"message" => "Message Sent:1701" // Or the error in case success = false
];
$scheduleAt = '2021-04-24 14:04:00'; // Time in the format Y-m-d H:i:s
$res = Savannabits\Movesms\Movesms::init($username,$apiKey, $senderId)
->to($recipients)
->message($message)
->sendLater($scheduleAt);