The cURL libraries provide a nice interface for file transfers to and from a webserver. They have support for a wide variety of protocols (like HTTPS) giving them an edge over built-in PHP functions like fsockopen(). The libraries are thread-safe, IPv6 compatible, and will work with any technology that is built on top of HTTP. Whether you are building simple script to fetch a web page, or a secure payment gateway, leveraging the functions built into cURL can save a lot of time.
Definition:
cURL stands for "Client URLs", and was developed by Daniel Stenberg in 1998 as a command line tool. libcurl is a portable library that provides an easy interface to the cURL functionality.
Both cURL and libcurl can transfer files using a wide variety of protocols, including HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and FILE.
The cURL libraries are truly open source, with an MIT/X derivative license.
Installation:
From PHP version 4.2.3 on, you need a cURL version of at least 7.9.0. From PHP version 4.3.0 on, you need a cURL version of at least 7.9.8.
Linux-After installing cURL (./configure, make, make install), PHP must be recompiled to include cURL support (--with-curl).
If cURL support is enabled, the phpinfo() function will display it in its output.
Windows – A good article can be found here
On windows check for path of php.ini path, for windows default path is C://windows so make sure that you are making changes to correct php.ini file.
Definition:
cURL stands for "Client URLs", and was developed by Daniel Stenberg in 1998 as a command line tool. libcurl is a portable library that provides an easy interface to the cURL functionality.
Both cURL and libcurl can transfer files using a wide variety of protocols, including HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and FILE.
The cURL libraries are truly open source, with an MIT/X derivative license.
Installation:
From PHP version 4.2.3 on, you need a cURL version of at least 7.9.0. From PHP version 4.3.0 on, you need a cURL version of at least 7.9.8.
Linux-After installing cURL (./configure, make, make install), PHP must be recompiled to include cURL support (--with-curl).
If cURL support is enabled, the phpinfo() function will display it in its output.
Windows – A good article can be found here
On windows check for path of php.ini path, for windows default path is C://windows so make sure that you are making changes to correct php.ini file.
Comments