PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.

In order to use PHP's cURL functions you need to install the libcurl package.In Ubuntu, just type the following command:
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
Don't forget to restart your web server.
sudo /etc/init.d/apache2 restart 


sudo service apache2 restart