how to check curl is working or not in php
In this article, we will know you how to check curl is working or not 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?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: