In this article, we will know you how to check curl is enabled or disabled in PHP. we will give a simple example of a check if curl is available on the server.
When we call the rest API using curl that time we need to check curl is enabled or disabled. so you can see our PHP curl example.
<?php function iscurlinstalled() { if (in_array ('curl', get_loaded_extensions())) { return true; } else{ return false; } } echo (iscurlinstalled())?'curl found':'no curl found'; ?>
Please follow and like us: