What is cURL, Install in PHP

cURL, which stands for client URL, is a command line tool that developers use to transfer data to and from a server. At the most fundamental, cURL lets you talk to a server by specifying the location (in the form of a URL) and the data you want to send.

cURL Libraries PHP

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.

Install cURL PHp

In order to use PHP’s cURL functions you need to install the » libcurl package. PHP requires libcurl version 7.10.5 or later. As of PHP 7.3.0, version 7.15.5 or later is required. As of PHP 8.0.0, version 7.29.0 or later is required.

For example install for os linux + php v8.1

sudo apt install php8.1-curl
// or defaut use php version
sudo apt install php-curl
READ :  Login, Register CodeIgniter3 (Hash BCRYPT) + Bootstrap4