Home > Article > Backend Development > What is PHP cURL?
What is PHP cURL?
PHP cURL is a powerful library that can connect and communicate with various servers and use various protocols. It also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP upload, HTTP form-based upload, and proxy , cookies, username and password authentication.
Recommended video tutorial: "PHP uses CURL to crawl pages"
PHP cURL Function
Function |
Description |
---|---|
curl_close() |
Close a cURL session. |
curl_copy_handle() |
Copy a cURL handle and all its options. |
curl_errno() |
Returns the last error number. |
curl_error() |
Returns a string that protects the most recent error in the current session. |
curl_escape() |
Returns the escape string, URL encoding the given string. |
curl_exec() |
Execute a cURL session. |
curl_file_create() |
Create a CURLFile object. |
curl_getinfo() |
Get information about a cURL connection resource handle. |
curl_init() |
Initialize a cURL session. |
curl_multi_add_handle() |
Add individual curl handles to a curl batch session. |
curl_multi_close() |
Close a group of cURL handles. |
curl_multi_exec() |
Runs a sub-connection of the current cURL handle. |
curl_multi_getcontent() |
If CURLOPT_RETURNTRANSFER is set, returns the text stream of the obtained output. |
curl_multi_info_read() |
Get the relevant transmission information of the currently parsed cURL. |
curl_multi_init() |
Returns a new cURL batch handle. |
curl_multi_remove_handle() |
Remove a handle resource in the curl batch handle resource. |
curl_multi_select() |
Wait for all active connections in the cURL batch. |
curl_multi_setopt() |
Sets a batch cURL transfer option. |
curl_multi_strerror() |
Returns a string text describing the error code. |
curl_pause() |
Pause and resume the connection. |
curl_reset() |
Resets all options of libcurl's session handle. |
curl_setopt_array() |
Set options for cURL transfer sessions in batches. |
curl_setopt() |
Set a cURL transfer option. |
curl_share_close() |
Close the cURL shared handle. |
curl_share_init() |
Initialize the cURL shared handle. |
curl_share_setopt() |
Sets the cURL transfer options for a shared handle. |
curl_strerror() |
Returns a string description of the error code. |
curl_unescape() |
Decode the URL-encoded string. |
curl_version() |
Get cURL version information. |
## Recommended tutorial: "PHP"
The above is the detailed content of What is PHP cURL?. For more information, please follow other related articles on the PHP Chinese website!