Files
opensourcepos/application/libraries/Sms.php
RamkrishnaMondal ee237c3c2e Fourth commit
2016-04-28 13:22:01 +05:30

24 lines
513 B
PHP

<?php
class Sms
{
function sendsms($uid, $pwd, $src, $phone, $msg)
{
//SMS Gateway API Link (Will be provided by your SMS Service Provider)//
$url="http://xxx.xxx.xxx.xxx/send_sms?username=$uid&password=$pwd&src=$src&dst=$phone&msg=$msg&dr=1"; // EXAMPLE OF URL LINK //
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $url);
$response = curl_exec($c);
curl_close($c);
echo "Message Sent Successfully";
}
}
?>