title: How to check if curl is enabled or disabled
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8786428/writing-a-function-in-php">Writing a function in php</a>  </p>
  </blockquote>
  
  
  
  <p>I'm using the following code</p>
  
  <pre><code>echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';
  </code></pre>
  
  <p>this can get it enabled or disabled</p>
  
  <p>but I would like to make as function say function name is <code>_iscurl</code></p>
  
  <p>then I can call it as following any where in my website code</p>
  
  <pre><code>if (_iscurl()){
    echo "this is enabled"; // will do an action
  }else{
    echo "this is disabled"; // will do another action
  }
  </code></pre>
  
  <p>almost same as my previous question <a href="https://stackoverflow.com/questions/13433660/how-to-check-if-allow-url-fopen-is-enabled-or-not">check if allow_url_fopen is enabled or not</a></p>