title: Not getting any response with curl
body: <p>I want to get curl response using the following code :</p>
  
  <pre><code>$url = "http://google.co.in";
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL,$url);
      $result=curl_exec ($ch);
      if(curl_exec($ch) === false) {
          print_r($result);
          echo "ok";
      }
      else {
          echo "error";
      }
  
      curl_close ($ch);
  </code></pre>
  
  <p>But when I am executing the code then getting response 'OK' but not printing the value of <code>result</code>. What I am missing ?</p>