Name: sendsms
** Function: This function is used to send SMS message to a mobile phone.
** The default implementation uses clickatell.com HTTP->SMS gateway.
** You can implement your own SMS gateway in this function easily.
** This is the new style clickatell API glue code
** Inputs: $recp - Mobile number
** $body - Message body
** $errmsg - Pointer to error message returned by the gateway
** Result: TRUE if API succeeded or FALSE
*****************************************************************************/
function sendsms($recp, $body, &$errmsg)
{
// enter your brandedsmspakistan.com credentials here
$bsp_email = "test@domain.com";
$bsp_api_key = "YOUR_BSP_API_KEY_HERE";
$bsp_masking = "YOUR_MASK_NAME_HERE";
// END OF CHANGES
// DO NOT TOUCH BELOW
// clean up HTML entities
$body = html_entity_decode($body, ENT_COMPAT, "UTF-8");
// uncomment the following lines to see the SMS details
// print $recp . "
";
// print $body . "
";
// return true;
$body = rawurlencode($body);
$body = urlencode($body);
$recp = preg_replace("/[^0-9]/", "",$recp);
$recp = "92".substr($dynamicstring, -10);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://secure.h3techs.com/sms/api/send?email=".$bsp_email."&key=".$bsp_api_key."&mask=".$bsp_masking."&to=".$recp."&message=".$body."");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
curl_close($ch);
// print $res;
// log result
if (substr($res, 0 , 4) == "ERR:")
$res_str = $res;
else
$res_str = "OK";
syslog(LOG_INFO, "[radiusmanager] Sending SMS via BSP to " . $recp . " (" . $res_str . ")");
// error has occured, return FALSE
if (substr($res, 0 , 4) == "ERR:")
{
$errmsg = $res;
return FALSE;
}
// no error, return TRUE
return TRUE;
}
?>
It is an easy-to-use billing software for Mikrotik, Cisco, StarOS, Chillispot, DD-WRT, pfSense NAS devices, and DOCSIS CMTS. It simplifies authentication, accounting, and billing in one place. Branded SMS Pakistan offers a smooth integration with DMA Softlab Radius Manager, providing you with SMS capabilities to enhance your financial market access. With our SMS API, you can improve your operations and improve user engagement. When a new account is activated in DMA Softlab Radius Manager, our SMS service allows you to send instant activation notifications to users, ensuring a smooth onboarding process. Additionally, you can enhance security by sending verification codes via SMS for new account activations, adding an extra layer of authentication for user accounts. Our SMS service also enables you to send billing notifications to users, keeping them informed about their financial transactions and ensuring timely payments. DMA Radius
DMA Softlab RAdius Manager
DMA Radius
Branded SMS your DMA Softlab Radius Manager
You can use the below codes to connect your system through API.
Join the 1000+ companies trusting BSP