Php client URL library -- cURL

Source: Internet
Author: User
PHP extension client URL library -- cURL

Introduction and installation configuration

The libcurl library created by Daniel Stenberg supported by PHP allows you to connect to and communicate with various servers using various protocols. Libcurl currently supports http, https, ftp, gopher, telnet, dict, file, and ldap protocols. Libcurl also supports HTTPS authentication, http post, http put, and FTP upload (this can also be completed through the FTP extension of PHP) HTTP form-based Upload, proxy, cookies, user name + password authentication.

These functions are introduced in PHP 4.0.2.

To use the PHP cURL function, you need to install the» libcurl package.

To support PHP cURL, you must add the -- with-curl [= DIR] option when compiling PHP. DIR is the directory path containing lib and include. The include directory must contain a folder named curl that contains easy. h and curl. h. The lib folder should contain a file named libcurl.. For PHP 4.3.0, you can configure -- with-curlwrappers to enable cURL to use URL streams.

Note: Win32 user attention
To use this module in Windows, libeay32.dll and ssleay32.dll must be placed in the directory included in the PATH environment variable. Do not use libcurl. dll on the cURL website.

CURL function

Curl_close-close a cURL session

Curl_copy_handle-copy a cURL handle and all its options

Curl_errno-returns the last error code

Curl_error-returns a string that protects the last error of the current session.

Curl_escape-URL encodes the given string

Curl_exec-execute a cURL session

Curl_file_create-Create a CURLFile object

Curl_getinfo-obtains the information of a cURL connection resource handle.

Curl_init-initialize a cURL session

Curl_multi_add_handle-add a separate curl handle to the curl batch processing session

Curl_multi_close-close a group of cURL handles

Curl_multi_exec-subconnection that runs the current cURL handle

Curl_multi_getcontent-if CURLOPT_RETURNTRANSFER is set, the obtained output text stream is returned.

Curl_multi_info_read-obtains the transmission information of the currently resolved cURL.

Curl_multi_init-return a new cURL batch handle

Curl_multi_remove_handle-remove a handle resource from the curl batch processing handle.

Curl_multi_select-wait for active connections in all cURL batch processing

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-set the option for cURL transmission sessions in batches

Curl_setopt-set a cURL transfer option

Curl_assist_close-Close a cURL share handle

Curl_assist_init-Initialize a cURL share handle

Curl_assist_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-obtain cURL version information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.