itechpk/brandedsms

Public API for sending SMS via BrandedSMS.Pk Service.

1.0.0 2018-04-16 13:27 UTC

This package is not auto-updated.

Last update: 2024-09-18 03:47:59 UTC


README

Public API for sending SMS via BrandedSMS.Pk Service.

Installation

composer require itechpk/brandedsms

PHP Code

require_once("./vendor/autoload.php");

use Itechpk\Brandedsms\BrandedSms;


//Configuration
$userId = "USER_ID";
$key = "SECRET_KEY";
$mask = "MASK";

//Sms Data
$mobileNo = "92333xxxxxxx";
$msg = "Your message here.";


//creating object
$sms = new BrandedSms();
//setting configuration
$sms->config($userId , $key , $mask);
//sending sms
$sent = $sms->send($mobileNo , $msg);

if($sent)
{
	echo "Sms send.";
}
else 
{
	//$lastCode = null;
    //$lastReply = null;
    //$lastId = null;
    //$lastSts = false;
	echo "Sms failed to send.";
}