PHP CURL Various parameters detailed

Source: Internet
Author: User
collection of several documents on the Web

PHP curl parameters in a detailed

So far the most complete curl in Chinese, learn PHP to master. There are a lot of parameters. Most of them are useful. Really mastered it and regular, must be a master of the collection.

Curl Libraries in PHP (Client URL library function)

curl_close-closing a Curl session

curl_copy_handle-Copy all contents and parameters of a Curl connection resource curl_errno-Returns a numeric number containing the current session error information curl_error-returns a string containing the current session error information

Curl_exec-performing a Curl session

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 resource to a Curl batch session curl_multi_close-Close a batch handle resource

curl_multi_exec-parsing a Curl batch handle

curl_multi_getcontent-returns the text stream of the obtained output

Curl_multi_info_read-Gets the associated transport information for the currently resolved Curl curl_multi_init-Initializes a curl batch handle resource

curl_multi_remove_handle-remove a handle resource from the Curl batch handle resource Curl_multi_select-get all the sockets associated with the Curl Extensio N, which can and be "selected"

curl_setopt_array-set session parameters for a curl as an array curl_setopt-set session parameters for a curl

curl_version-getting the version information about Curl

The Curl_init () function Initializes a curl session, and the only parameter to the Curl_init () function is optional, representing a URL address.

The function of the curl_exec () function is to perform a curl session, and the only argument is the handle returned by the Curl_init () function.

The function of the Curl_close () function is to close a curl session, and the only argument is the handle returned by the Curl_init () function.

$ch = Curl_init ("http://www.php.cn/");

Curl_exec ($ch);

Curl_close ($ch);

?>

The Curl_version () function is to get curl-related version information, and the Curl_version () function has a parameter that is not clear what to do

  • 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.