title: CURL returning Couldn't resolve host in yii
body: <p>I am trying to call CURL to another localhost project using yii. But in returns <code>Couldn't resolve host</code></p>
  
  <p>However, if I CURL other projects, it works fine. Is there any setting I need to update in the project I want to use CURL?</p>
  
  <p>Here is my code:</p>
  
  <pre><code> $ch = curl_init("https://test.localhost");   
   curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
   curl_setopt( $ch, CURLOPT_HEADER, 0 );
   curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  
   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
   curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
  
   curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  
   $data = curl_exec($ch);
   if(curl_exec($ch) === false)
   {
     echo 'Curl error: ' . curl_error($ch);
   }
   var_dump($data);
   exit;
  </code></pre>