public function hasSupport($requireSsl) { if (!extension_loaded('curl')) { return false; } if ($requireSsl) { $info = curl_version(); return in_array('https', $info['protocols']); } return true; }