PHP code example of ngarak-dev / nextsms
1. Go to this page and download the library: Download ngarak-dev/nextsms 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/ */
ngarak-dev / nextsms example snippets
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::sendSingleSMS(['to' => '25500000000', 'text' => 'Hellooooo Next.']);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::sendSingleSMSToMultipleDestination([
'to' => ['255000000000','255111111111'],
'text' => 'Helooooo.']);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::sendMultipleSMSToMultipleDestinations(['messages' => [
['to' => '255000000000', 'text' => 'Helooo Next.'],
['to' => '255111111111', 'text' => 'Helooo Next.']
]]);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::sendMultipleSMSToMultipleDestinations(['messages' => [
['to' => ['25500000000','25500000000'], 'text' => 'Heloooooooo.'],
['to' => '25500000000', 'text' => 'Heloooooooo.']
]]);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::scheduleSMS([
'to' => '25500000000',
'text' => 'Heloooooooo.',
'date' => '2022-01-25' ,
'time' => '12:00']);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getAllDeliveryReports();
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getDeliveryReportWithMessageId(243452542526627);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getDeliveryReportWithSpecificDateRange('2022-01-25', '2022-01-29');
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getAllSentSMSLogs(10, 5);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getAllSentSMSLogsWithOptionalParameter('255000000000','2022-01-25', '2022-01-29',10, 5);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::subCustomerCreate(
'Michael',
'Juma',
'[email protected] ',
'062500000000',
'Sub Customer (Reseller)',
100);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::subCustomerRecharge('[email protected] ', 100);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::subCustomerDeduct('[email protected] ', 100);
use NgarakDev\NextSMS\NextSMS;
$response = NextSMS::getSMSBalance();