Easy Tutorial
❮ Php Pdo Func String Nl2Br ❯

PHP curl_multi_setopt Function

PHP cURL Reference Manual

(PHP 5 >= 5.5.0)

curl_multi_setopt — Set an option for a cURL multi-handle transfer.


Description

bool curl_multi_setopt ( resource $mh , int $option , mixed $value )

Sets an option for a cURL multi-handle transfer.


Parameters

mh

A cURL multi-handle returned by curl_multi_init().

option

The CURLOPT_XXX option to set.

value

The value to be set on the option.

For the following options, the value should be set to a bool:

Option Possible value Notes
CURLOPT_AUTOREFERER Automatically set the Referer: field in headers when redirecting.
CURLOPT_BINARYTRANSFER Return raw output when using CURLOPT_RETURNTRANSFER.
CURLOPT_COOKIESESSION Start a new cookie session, ignoring other cookies.
CURLOPT_CRLF Convert Unix newlines to CRLF.
CURLOPT_DNS_USE_GLOBAL_CACHE Enable a global DNS cache. This is thread-safe and enabled by default.
CURLOPT_FAILONERROR Return an error for status codes >= 400.
CURLOPT_FILETIME Attempt to retrieve the modification date of the remote document.
CURLOPT_FOLLOWLOCATION Follow HTTP 3xx redirects. Use CURLOPT_MAXREDIRS to limit the number of redirects.
CURLOPT_FORBID_REUSE Force a new connection instead of reusing an existing one.
CURLOPT_FRESH_CONNECT Force a new connection instead of using a cached one.
CURLOPT_FTP_USE_EPRT Use EPRT or LPRT for FTP downloads. Set to FALSE to disable EPRT and LPRT.
CURLOPT_FTP_USE_EPSV Try EPSV command first for FTP transfers. Set to FALSE to disable EPSV.
CURLOPT_FTPAPPEND Append to the file instead of overwriting it.
CURLOPT_FTPASCII Alias of CURLOPT_TRANSFERTEXT.
CURLOPT_FTPLISTONLY List only the names of FTP directories.
CURLOPT_HEADER Include the header in the output.
CURLINFO_HEADER_OUT Track the request string. Available since PHP 5.1.3. CURLINFO_ prefix is intentional.
CURLOPT_HTTPGET Set HTTP method to GET. Use only if modified.
CURLOPT_HTTPPROXYTUNNEL Tunnel through an HTTP proxy.
CURLOPT_MUTE Restore all cURL options to default values.
CURLOPT_NETRC Use ~/.netrc file for login credentials.
CURLOPT_NOBODY Exclude the body from the output.
CURLOPT_NOPROGRESS When enabled, the progress bar for cURL transfers is disabled. This option is enabled by default. Note: <br> <br> PHP automatically sets this option to TRUE, and it should only be changed for debugging purposes.
CURLOPT_NOSIGNAL When enabled, all signals sent to PHP by cURL are ignored. This option is enabled by default in SAPI multithreaded transfers. Added in cURL 7.10.
CURLOPT_POST When enabled, a regular POST request is sent, with the type: application/x-www-form-urlencoded, similar to form submission.
CURLOPT_PUT When enabled, allows HTTP to send files, must set CURLOPT_INFILE and CURLOPT_INFILESIZE simultaneously.
CURLOPT_RETURNTRANSFER Returns the information obtained by curl_exec() as a file stream instead of outputting it directly.
CURLOPT_SSL_VERIFYPEER When disabled, cURL will not verify the server. Use the CURLOPT_CAINFO option to set the certificate, and the CURLOPT_CAPATH option to set the certificate directory. <br> If CURLOPT_SSL_VERIFYPEER (default value is 2) is enabled, CURLOPT_SSL_VERIFYHOST needs to be set to TRUE, otherwise set to FALSE. Defaults to TRUE since cURL 7.10. Bundled implementation since cURL 7.10.
CURLOPT_TRANSFERTEXT When enabled, uses ASCII mode for FTP transfers. For LDAP, it retrieves plain text information instead of HTML. On Windows systems, the system does not set STDOUT to binary mode.
CURLOPT_UNRESTRICTED_AUTH Appends username and password information to multiple locations in headers generated by CURLOPT_FOLLOWLOCATION, even if the domain has changed.
CURLOPT_UPLOAD When enabled, allows file uploads.
CURLOPT_VERBOSE When enabled, reports all information, stored in STDERR or specified by CURLOPT_STDERR.

Return Value

Returns TRUE on success, or FALSE on failure.


PHP cURL Reference Manual

❮ Php Pdo Func String Nl2Br ❯