16/04
2018
Wallogit.com
2017 © Pedro Peláez
Public API for sending SMS via BrandedSMS.Pk Service.
Public API for sending SMS via BrandedSMS.Pk Service., (*1)
composer require itechpk/brandedsms
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.";
}