Php Ref Curl
# PHP cURL Functions
* * *
## Overview
PHP supports the libcurl library created by Daniel Stenberg, which allows you to connect and communicate with various servers using different types of protocols.
libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS authentication, HTTP POST, HTTP PUT, FTP upload (which can also be done via PHP's FTP extension), HTTP form-based upload, proxies, cookies, and username+password authentication.
Methods for implementing Get and Post requests using cURL in PHP
These functions were introduced in PHP 4.0.2.
* * *
## Requirements
To use PHP's cURL functions, you need to install the (https://curl.se/) package.
PHP requires libcurl 7.0.2-beta or later. To use cURL in PHP 4.2.3, you need to install libcurl 7.9.0 or later. From PHP 4.3.0 onwards, you need to install libcurl 7.9.0 or later. From PHP 5.0.0 onwards, you need to install libcurl 7.10.5 or later.
* * *
## Installation
To use PHP's cURL support, you must compile PHP with the --with-curl option, where DIR is the directory path containing the lib and include directories. The include directory must contain a folder named curl, which includes easy.h and curl.h. The lib folder should contain a file named libcurl.a. For PHP 4.3.0, you can configure --with-curlwrappers to make cURL use URL streams.
Note: Win32 Users Note: To use this module on Windows, libeay32.dll and ssleay32.dll must be placed in a directory included in the PATH environment variable. Do not use libcurl.dll from the cURL website.
* * *
## Resource Types
This extension defines two resource types: cURL handles and cURL multi handles.
* * *
## PHP cURL Functions
The following contains a list of PHP cURL functions:
| Function | Description |
| --- | --- |
| [curl_close()](#) | Close a cURL session. |
| [curl_copy_handle()](#) | Copy a cURL handle and all its options. |
| [curl_errno()](#) | Return the last error number. |
| [curl_error()](#) | Return a string containing the last error for the current session. |
| [curl_escape()](#) | Return URL-encoded string for a given string. |
| [curl_exec()](#) | Execute a cURL session. |
| [curl_file_create()](#) | Create a CURLFile object. |
| [curl_getinfo()](#) | Get information regarding a specific cURL connection resource handle. |
| [curl_init()](#) | Initialize a cURL session. |
| [curl_multi_add_handle()](#) | Add an individual cURL handle to a cURL multi handle. |
| [curl_multi_close()](#) | Close a set of cURL handles. |
| [curl_multi_exec()](#) | Run the sub-connections of the current cURL handle. |
| [curl_multi_getcontent()](#) | If CURLOPT_RETURNTRANSFER is set, return the text stream of the retrieved output. |
| [curl_multi_info_read()](#) | Get information about the current transfers related to the cURL multi handle. |
| [curl_multi_init()](#) | Return a new cURL multi handle. |
| [curl_multi_remove_hand
YouTip