English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
(PHP 5 >= 5.5.0)
curl_multi_setopt — Set a batch CURL transfer option.
bool curl_multi_setopt ( resource $mh , int $option , mixed $value )
Set a batch CURL transfer option.
ch
The CURL handle returned by curl_init().
option
The CURLOPT_XXX option that needs to be set.
value
The value set on the option option.
For the optional parameters of the following options, the value should be set to a boolean value:
Options | OptionalvalueValue | Notes |
---|---|---|
CURLOPT_AUTOREFERER | When based onLocation:Automatically set the header in the case of redirection.Referer:information. | |
CURLOPT_BINARYTRANSFER | When enabledCURLOPT_RETURNTRANSFERReturns the original (Raw) output. | |
CURLOPT_COOKIESESSION | When enabled, curl will only pass a session cookie, ignoring other cookies. By default, CURL will return all cookies to the server. A session cookie refers to cookies that exist to determine if the server-side session is valid. | |
CURLOPT_CRLF | When enabled, Unix newline characters are converted to carriage return newline characters. | |
CURLOPT_DNS_USE_GLOBAL_CACHE | When enabled, it will enable a global DNS cache, which is thread-safe and enabled by default. | |
CURLOPT_FAILONERROR | Display HTTP status code, the default behavior is to ignore numbers less than or equal to400 HTTP information. | |
CURLOPT_FILETIME | When enabled, it will attempt to modify the information in the remote document. The result information will be passed through the curl_getinfo() function'sCURLINFO_FILETIMEoptions return. curl_getinfo(). | |
CURLOPT_FOLLOWLOCATION | When enabled, it will return the server's response"Location: "Place the recursive return in the header and return it to the server usingCURLOPT_MAXREDIRSThe number of recursive returns can be limited. | |
CURLOPT_FORBID_REUSE | Forcefully disconnect after completing the interaction, and cannot be reused. | |
CURLOPT_FRESH_CONNECT | Force a new connection to be obtained instead of the connection in the cache. | |
CURLOPT_FTP_USE_EPRT | When enabled, it will use the EPRT (or LPRT) command when downloading FTP. Set toFALSEDisable EPRT and LPRT, use PORT command when enabled. only. | |
CURLOPT_FTP_USE_EPSV | When enabled, it will first try the EPSV command before reverting to PASV mode during FTP transmission. Set toFALSEDisable EPSV command when enabled. | |
CURLOPT_FTPAPPEND | When enabled, it will append to the file instead of overwriting it. | |
CURLOPT_FTPASCII | CURLOPT_TRANSFERTEXTAlias. | |
CURLOPT_FTPLISTONLY | When enabled, it will only list the names of the FTP directories. | |
CURLOPT_HEADER | When enabled, it will output the information of the header file as a data stream. | |
CURLINFO_HEADER_OUT | When enabled, it will trace the request string of the handle. | From PHP 5.1.3 Start available.CURLINFO_The prefix is intentional. |
CURLOPT_HTTPGET | When enabled, it will set the HTTP method to GET, as GET is the default, so it is only used when modified. | |
CURLOPT_HTTPPROXYTUNNEL | When enabled, it will transmit through an HTTP proxy. | |
CURLOPT_MUTE | When enabled, it will restore all modified parameters in the CURL function to their default values. | |
CURLOPT_NETRC | After the connection is established, access ~/The .netrc file retrieves username and password information to connect to a remote site. | |
CURLOPT_NOBODY | When enabled, it will not output the BODY part in HTML. | |
CURLOPT_NOPROGRESS | When enabled, it closes the progress bar of curl transmission. The default setting for this option is enabled. Note: PHP automatically sets this option toTRUE, this option should only be changed for debugging purposes. | |
CURLOPT_NOSIGNAL | When enabled, it ignores all signals passed to PHP by curl. This option is enabled by default in SAPI multi-threaded transmission. | CURL 7.10is added. |
CURLOPT_POST | When enabled, it sends a regular POST request, type:application/x-www-form-urlencoded, just like form submission. | |
CURLOPT_PUT | When enabled, it allows HTTP to send files, and it must be set at the same timeCURLOPT_INFILEandCURLOPT_INFILESIZE. | |
CURLOPT_RETURNTRANSFER | to return the information obtained by curl_exec() in the form of a file stream, rather than outputting directly. | |
CURLOPT_SSL_VERIFYPEER | After disabling, CURL will terminate the verification from the server. UseCURLOPT_CAINFOthe option sets the certificate usageCURLOPT_CAPATHthe option sets the certificate directory IfCURLOPT_SSL_VERIFYPEER(The default value is2is enabled,CURLOPT_SSL_VERIFYHOSTneeds to be set toTRUEotherwise set toFALSE. | Since CURL 7.10is set to default.TRUE. Starting from CURL 7.10Start the default binding installation. |
CURLOPT_TRANSFERTEXT | Enabling it uses ASCII mode for FTP transfers. For LDAP, it retrieves plain text information rather than HTML. On Windows systems, the system does not treatSTDOUTSet to binary mode. | |
CURLOPT_UNRESTRICTED_AUTH | When usingCURLOPT_FOLLOWLOCATIONContinuously append username and password information to the multiple locations in the generated header, even if the domain has changed. | |
CURLOPT_UPLOAD | Enabling it allows file uploads. | |
CURLOPT_VERBOSE | When enabled, it reports all information, stored inSTDERRor specifiedCURLOPT_STDERRin. |
Returns TRUE on success, or FALSE on failure.