curl_multi_setopt

(PHP 5 >= 5.5.0, PHP 7, PHP 8)

curl_multi_setoptSet a cURL multi option

Descrizione

curl_multi_setopt(CurlMultiHandle $multi_handle, int $option, mixed $value): bool

Sets an option on the given cURL multi handle.

Elenco dei parametri

mh

Un identificativo multiplo rstituito da curl_multi_init().

option

One of the CURLMOPT_* constants.

value

The value to be set on option. See the description of the CURLMOPT_* constants for details on the type of values each constant expects.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Log delle modifiche

Versione Descrizione
8.2.0 Introduced CURLMOPT_MAX_CONCURRENT_STREAMS.
8.0.0 multi_handle expects a CurlMultiHandle instance now; previously, a resource was expected.
7.1.0 Introduced CURLMOPT_PUSHFUNCTION.
7.0.7 Introduced CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLMOPT_MAX_HOST_CONNECTIONS, CURLMOPT_MAX_PIPELINE_LENGTH and CURLMOPT_MAX_TOTAL_CONNECTIONS.

add a note

User Contributed Notes 1 note

up
0
ryosuke_i_628 at yahoo dot co dot jp
8 years ago
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);
?>
To Top