curl_multi_setopt
(PHP 5 >= 5.5.0)
curl_multi_setopt — Set an option for the cURL multi handle
Description
Warning
This function is currently not documented; only its argument list is available.
Parameters
-
mh
-
-
option
-
One of the
CURLMOPT_*
constants. -
value
-
The value to be set on
option
.value
should be an int for the following values of theoption
parameter:Option Set value
toCURLMOPT_PIPELINING
Pass 1 to enable or 0 to disable. Enabling pipelining on a multi handle will make it attempt to perform HTTP Pipelining as far as possible for transfers using this handle. This means that if you add a second request that can use an already existing connection, the second request will be "piped" on the same connection rather than being executed in parallel. CURLMOPT_MAXCONNECTS
Pass a number that will be used as the maximum amount of simultaneously open connections that libcurl may cache. Default is 10. When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing.
Return Values
Returns TRUE
on success or FALSE
on failure.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Другие службы
- Клиентская библиотека работы с URL
- curl_close
- curl_copy_handle
- curl_errno
- curl_error
- curl_escape
- curl_exec
- curl_file_create
- curl_getinfo
- curl_init
- curl_multi_add_handle
- curl_multi_close
- curl_multi_exec
- curl_multi_getcontent
- curl_multi_info_read
- curl_multi_init
- curl_multi_remove_handle
- curl_multi_select
- curl_multi_setopt
- curl_multi_strerror
- curl_pause
- curl_reset
- curl_setopt_array
- curl_setopt
- curl_share_close
- curl_share_init
- curl_share_setopt
- curl_strerror
- curl_unescape
- curl_version
Коментарии
If you want to enable both HTTP/1.1 pipelining and HTTP/2 multiplexing...
<?php
curl_multi_setopt($mh, CURLMOPT_PIPELINING, 3);
?>
or
<?php
curl_multi_setopt($mh, CURLMOPT_PIPELINING, CURLPIPE_HTTP1 | CURLPIPE_MULTIPLEX);
?>