Untitled
unknown
plain_text
5 years ago
1.3 kB
9
Indexable
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Customsms {
private $_CI;
var $AUTH_KEY = "C2000299600463d5256bb8.79945325 "; //your AUTH_KEY here
var $senderId = "8809601001296"; //your senderId here
var $routeId = ""; //your routeId here
var $smsContentType = "TEXT"; //your smsContentType here
function __construct() {
$this->_CI = & get_instance();
$this->session_name = $this->_CI->setting_model->getCurrentSessionName();
}
function sendSMS($to, $message) {
$content = 'AUTH_KEY=' . rawurlencode($this->AUTH_KEY) .
'&message=' . rawurlencode($message) .
'&senderId=' . rawurlencode($this->senderId) .
'&routeId=' . rawurlencode($this->routeId) .
'&mobileNos=' . rawurlencode($to) .
'&smsContentType=' . rawurlencode($this->smsContentType);
$ch = curl_init('http://gsms.putulhost.com/smsapi?api_key=(C2000299600463d5256bb8.79945325)&type=TEXT&sender=(8809601001296)&mobile=$to&message=$message' . $content);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
}
?>Editor is loading...