We come across web applications which are written in PHP and require curl extension. PHP curl functions can used through use of libcurl. The libcurl was create by Daniel Sternberg. With the help of libcurl you can connect and communicate with webserver using different protocols. cURL stands for Client for URLs. It allows us to transfer files having URL syntax. It supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE.
Enable Curl in Ubuntu:
Once you have Lamp setup ready just type in following command in terminal to install curl library,
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
After installing libcurl you should restart the web server with following command,
sudo /etc/init.d/apache2 restart
Enable Curl in Windows (XAMPP):
To enable curl library with Windows (XAMPP) we need to modify the php.ini files in our folder.
1) Locate the following files:
Installed Location phpphp.ini
Installed Location phpphp4php.ini
2) Uncomment the following line on your php.ini file by removing the semicolon.
3) Restart your apache server.
Now, you can check your phpinfo if curl was properly enabled.