1. Go to this page and download the library: Download developifynet/telenor-php 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/ */
developifynet / telenor-php example snippets
use Developifynet\Telenor\Telenor;
public function index()
{
$SMSObj = array(
'username' => '<PUT_YOUR_USERNAME_HERE>', // Usually this is mobile number
'password' => '<PUT_YOUR_PASSWORD_HERE>', // User your password here
'to' => '923XXXXXXXXX', // You can provide single number as string or an array of numbers
'text' => '<PUT_YOUR_MESSAGE_HERE>', // Message string you want to send to provided number(s)
'mask' => '<PUT_YOUR_MASK_HERE>', // Use a registered mask with Telenor
'test_mode' => '0', // 0 for Production, 1 for Mocking as Test
);
$response = Telenor::SendSMS($SMSObj);
}
use Developifynet\Telenor\Telenor;
public function index()
{
$SMSObj = array(
'username' => '<PUT_YOUR_USERNAME_HERE>', // Usually this is mobile number
'password' => '<PUT_YOUR_PASSWORD_HERE>', // User your password here
'to' => ['923XXXXXXXXX', '923XXXXXXXXX'], // You can provide single number as string or an array of numbers
'text' => '<PUT_YOUR_MESSAGE_HERE>', // Message string you want to send to provided number(s)
'mask' => '<PUT_YOUR_MASK_HERE>', // Use a registered mask with Telenor
'test_mode' => '0', // 0 for Production, 1 for Mocking as Test
);
$response = Telenor::SendSMS($SMSObj);
}
use \Developifynet\Telenor\TelenorSMS;
public function index()
{
$SMSObj = array(
'username' => '<PUT_YOUR_USERNAME_HERE>', // Usually this is mobile number
'password' => '<PUT_YOUR_PASSWORD_HERE>', // User your password here
'to' => '923XXXXXXXXX', // You can provide single number as string or an array of numbers
'text' => '<PUT_YOUR_MESSAGE_HERE>', // Message string you want to send to provided number(s)
'mask' => '<PUT_YOUR_MASK_HERE>', // Use a registered mask with Telenor
'test_mode' => '0', // 0 for Production, 1 for Mocking as Test
);
$telenor = new TelenorSMS();
$response = $telenor->SendSMS($SMSObj);
}
use \Developifynet\Telenor\TelenorSMS;
public function index()
{
$SMSObj = array(
'username' => '<PUT_YOUR_USERNAME_HERE>', // Usually this is mobile number
'password' => '<PUT_YOUR_PASSWORD_HERE>', // User your password here
'to' => ['923XXXXXXXXX', '923XXXXXXXXX'], // You can provide single number as string or an array of numbers
'text' => '<PUT_YOUR_MESSAGE_HERE>', // Message string you want to send to provided number(s)
'mask' => '<PUT_YOUR_MASK_HERE>', // Use a registered mask with Telenor
'test_mode' => '0', // 0 for Production, 1 for Mocking as Test
);
$telenor = new TelenorSMS();
$response = $telenor->SendSMS($SMSObj);
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.