class controller extends CI_Controller {
public function
__construct() {
parent::__construct();
$this->load->library('session');
$this->load->library('curl');
$this->load->helper(array('url', 'form'));
}
public function callingurl()
{
$get_url = 'http://stackoverflow.com/questions/ask';
echo $this->curl->simple_get($get_url, false, array(CURLOPT_USERAGENT => true));
}
}
Вы пытаетесь получить доступ к протоколу HTTPS, который получает сертификат SSL. Поэтому сделайте свой код как...
public function callingurl()
{
$get_url = 'https://www.google.com';
$this->curl->ssl(FALSE); // making the ssl certificate to false;
echo $this->curl->simple_get($get_url, false, array(CURLOPT_USERAGENT => true));
}
$baseurl = "http://promo.blastsms.in/sendsms.jsp?";
$user = "xxxxx";
$password = "xxxxx";
$api_id = "xxxxx";
$url="$baseurl/&user=$user&password=$password&mobiles=$to&sms=$text&senderid=$api_id&version=$version";
таким образом я разделил свой url.