无法从谷歌recaptcha得到回应

I am working in an application by using codeigniter framework back end as mysql. In login page I am trying to apply Google recaptcha as given by recaptcha.

For this i have added curl.php library in application/library given by codeigniter-curl

and in my controller I am writing following code

$recaptchaResponse = trim($this->input->post('g-recaptcha-response'));
$userIp=$this->input->ip_address();
$secret='MY_KEY';
$url="https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response;=".$recaptchaResponse."&remoteip;=".$userIp;
$response = $this->curl->simple_get($url);
$status= json_decode($response, true);
if($status['success']){    
   $this->session->set_flashdata('flashSuccess', 'Google Recaptcha Successful');
  }else{
   $this->session->set_flashdata('flashSuccess', 'Sorry Google Recaptcha Unsuccessful!!');
  }

in controller I am adding following libraries

$this->load->library('curl');
$this->load->library('javascript');
$this->load->library('javascript/jquery');

But unable to get response from

$this->curl->simple_get($url); 

I am not getting what I am missing in my code. please guide me for above issue.

You can use curl errors to gather more information about the root cause of the error.

if(curl_errno($c))
{
    echo 'error:' . curl_error($c);
}