How to install CURL and Check CURL is enabled or available in Web Server using PHP

This tutorial will explain about to check whether CURL is enabled or not in your web server. CURL(Transfer a URL) is a tool to transfer data from one server to another server using any supported protocol like SMTP, SMTPS, HTTP, HTTPS etc. These CURL is used by many application.

I have used in this application: Login With Google Account OAuth in PHP, Mysql

You can also enable the CURL using PHP.ini file from PHP Extension. These days most of the web server provider supports CURL and enabled it by default. But you can also enable it. If you use any shared web server, you can contact to your service provider to enable it. The following steps will explain about CURL installation

CURL Installation

Install CURL in Linux

Use this command to Install CURL in Linux

sudo apt-get install php5-curl

After installation, you need to restart your web server using this command

sudo service apache2 restart

sudo /etc/init.d/apache2 restart

Install CURL in Window

Just open your php.ini file from C:wampbinapacheApache2.2.21bin location and enable php_curl.dll extension.

After enable this extension, you need to restart your server.

To check whether CURL is enabled or available on your web server or not. Please make a .php file and write the below code and your can easily check from available extensions.


if  (in_array  ('curl', get_loaded_extensions())) {

        echo "CURL is available on your web server";

    }  else {
        echo "CURL is not available on your web server";

This is simple method to check whether CURL is enabled or not

Other way to check,

Just run phpinfo(); function in your web browser if CURL is enabled then a block of CURL will display in your screen.

Share this Article on Social Media

All of my Scripts are ready to customized as per your requirement. Feel free to contact for script customization.

Contact me at

"Note : It will be charged as per your customization requirement :)"

Get Updates, Scripts & Other Tutorials to Directly to your Email

Over 20000+ Happy Readers already subscribed. (We don't send spam email). Every email subscriber can get our latest updates and download our 100+ scripts.