1. Go to this page and download the library: Download itexmo/itexmo-sms 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/ */
itexmo / itexmo-sms example snippets
use Itexmo\ItexmoSms\ItexmoSms;
$itexmo = app(ItexmoSms::class);
$recipients = ['number_1_here', 'number_2_here'];
$message = 'Hello from Itexmo!';
$response = $itexmo->broadcast($recipients, $message);
if ($response['success']) {
echo "SMS sent successfully!";
} else {
echo "SMS sending failed: " . $response['message'];
}
$itexmo = app(ItexmoSms::class);
$response = $itexmo->checkBalance();
if ($response['success']) {
echo "Your balance is: " . $response['data']['Balance'];
} else {
echo "Failed to check balance: " . $response['message'];
}
$recipients = ['number_1_here', 'number_2_here'];
$message = 'Your OTP is 123456.';
$response = $itexmo->broadcastOTP($recipients, $message);
if ($response['success']) {
echo "OTP sent successfully!";
} else {
echo "Failed to send OTP: " . $response['message'];
}