28 lines
598 B
PHP
28 lines
598 B
PHP
<?php
|
|
|
|
class SMS_GUPSHUP
|
|
{
|
|
|
|
|
|
|
|
|
|
public static function sendSMS($msg,$no)
|
|
{
|
|
$CI =&get_instance();
|
|
$sms_api_url = $CI->config->item('sms_gupshup_url');
|
|
$sms_api_url = str_replace('{{sms_api_user_id}}',$CI->config->item('sms_api_user_id'),$sms_api_url);
|
|
$sms_api_url = str_replace('{{sms_api_pwd}}',$CI->config->item('sms_api_pwd'),$sms_api_url);
|
|
$sms_api_url = str_replace('{{send_to_mobile_no}}',$no,$sms_api_url);
|
|
$sms_api_url = str_replace('{{send_msg}}',$msg,$sms_api_url);
|
|
|
|
$client = new \GuzzleHttp\Client();
|
|
$response = $client->post($sms_api_url);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
?>
|