1. Go to this page and download the library: Download durranilab/httpsms 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/ */
use Durranilab\Httpsms\Facades\HttpSMS;
...
// WHEN ALL PARAMETERS ARE SET IN CONFIG FILE USE
$balanceResponse = HttpSMS::getBalance();
// OR TO USE PARAMETERS IN METHOD
$balanceResponse = HttpSMS::getBalance(
['username'=>'durranilab',
'password'=>'YOURPASSWORD',
]);
//TO SEND SMS
$phone = "9764000000,9764123456,...";
$msg = "SMS \n TEXT ";
// WHEN ALL PARAMETERS ARE SET IN CONFIG FILE USE
$smsResponse = HttpSMS::sendMessage();
// OR TO USE PARAMETERS IN METHOD
$smsResponse = HttpSMS::sendMessage([
'TemplateID' => '1234567890',
'message' => $msg,
'mobile' => $phone]);
use Durranilab\Httpsms\HttpSMS;
...
$smsProvider = new HttpSMS();
$balanceResponse = $smsProvider->getBalance();
$smsResponse = $smsProvider->sendMessage();
//OR
$balanceResponse = $smsProvider->getBalance(['username'=>'user123']);
$smsResponse = $smsProvider->sendMessage(['username'=>'user123']);