Introduction and Installation Configuration
PHP-supported Libcurl libraries created by Daniel Stenberg allow you to connect and communicate with a variety of servers using various 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 (This can also be done via PHP's FTP extension), HTTP forms-based uploads, proxies, cookies, and Username + password Authentication.
These functions are introduced in PHP 4.0.2.
In order to use the PHP curl function, you need to install the»libcurl package.
To use PHP's curl support you must compile PHP with the--with-curl[=dir] option, dir is the directory path that contains Lib and include. In the Include directory, you must have a folder called Curl, which contains easy.h and curl.h. There should be a file named Libcurl.a in the Lib folder. For PHP 4.3.0 You can configure--with-curlwrappers to use the URL stream for curl.
Note:win32 User Note
To use this module in a Windows environment, Libeay32.dll and Ssleay32.dll must be placed in the directory contained in the PATH environment variable. Don't use the Libcurl.dll on the Curl website.
CURL function
curl_close-closing a Curl session
curl_copy_handle-copy a curl handle and all of its options
curl_errno-returns the last error number
curl_error-returns a string that protects the most recent error of the current session
Curl_escape-url encodes the given string
Curl_exec-performing a Curl session
Curl_file_create-create a Curlfile object
Curl_getinfo-gets the information for a Curl connection resource handle
curl_init-initialization of a curl session
curl_multi_add_handle-Adding a separate curl handle to a curl batch session
curl_multi_close-closing a set of curl handles
curl_multi_exec-A child connection that runs the current CURL handle
curl_multi_getcontent-if Curlopt_returntransfer is set, returns the text stream of the obtained output
Curl_multi_info_read-Gets the related transfer information for the currently resolved curl
curl_multi_init-returns a new Curl batch handle
curl_multi_remove_handle-removing a handle resource from the Curl batch handle resource
curl_multi_select-waiting for active connections in all Curl batches
Curl_multi_setopt-set an option for the CURL multi handle
Curl_multi_strerror-return string describing error code
Curl_pause-pause and unpause a connection
Curl_reset-reset all options of a libcurl session handle
curl_setopt_array-Bulk setup options for Curl transfer sessions
curl_setopt-Setting a Curl Transfer option
Curl_share_close-close a CURL share handle
Curl_share_init-initialize a CURL share handle
Curl_share_setopt-set an option for a CURL share handle.
Curl_strerror-return string describing the given error code
Curl_unescape-decodes the given URL encoded string
curl_version-Getting Curl Version information