Current File : /home/giriqfky/public_html/Barga/application/models//Base_model.php
<?php
class Base_model extends CI_Model{
var $table_app_registration = TABLE_APP_REGISTRATIONS;
public function __construct()
{
parent::__construct();
}
public function getRegisteredDeviceCount($app_user_id, $device_type)
{
$this->db->select('*');
$this->db->where(array('app_user_id' => $app_user_id, 'device_type' => $device_type));
return $this->db->get($this->table_app_registration)->num_rows();
}
public function sendSmsByModel($url='')
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
}