PHP curl_multi_setopt function
PHP curl_multi_setopt function
(PHP 5> = 5.5.0)
curl_multi_setopt - set up a batch cURL transfer options.
Explanation
bool curl_multi_setopt ( resource $mh , int $option , mixed $value )
Set up a batch cURL transfer options.
parameter
ch
By the curl_init () returns a cURL handle.
option
CURLOPT_XXX options need to be set.
value
Set the value of the option on the options.
For the following optional parameters of these option, value should be set to a value of type bool:
Options | Optional value value | Remark |
---|---|---|
CURLOPT_AUTOREFERER | When according Location: redirect automatically set header in the Referer: information. | |
CURLOPT_BINARYTRANSFER | CURLOPT_RETURNTRANSFER when enabled, return native (Raw) output. | |
CURLOPT_COOKIESESSION | When enabled curl will only pass a session cookie, ignore the other cookie, default status cURL will return all of the cookie to the server. session cookie are those used to determine the validity of the server-side session exists cookie. | |
CURLOPT_CRLF | When you enable the Unix newline into carriage return. | |
CURLOPT_DNS_USE_GLOBAL_CACHE | Enabled enabled a global DNS cache, enable this thread safe, and default. | |
CURLOPT_FAILONERROR | Display HTTP status code, the default behavior is to ignore the number of 400 or less HTTP information. | |
CURLOPT_FILETIME | It will try to modify remote information in the document is enabled. Results information is () CURLINFO_FILETIME option function returns through curl_getinfo. curl_getinfo (). | |
CURLOPT_FOLLOWLOCATION | When the server returns the server will enable the "Location:" header on the recursion back to the server, you can use CURLOPT_MAXREDIRS defined recursively return number. | |
CURLOPT_FORBID_REUSE | Forced disconnect after completion of interaction can not be reused. | |
CURLOPT_FRESH_CONNECT | Forced to get a new connection, replace the cache connection. | |
CURLOPT_FTP_USE_EPRT | When enabled FTP downloads, use EPRT (or LPRT) command. Disable EPRT and LPRT when set to FALSE, use the PORT command only. | |
CURLOPT_FTP_USE_EPSV | When enabled, the reply to the PASV mode FTP transfer process before the first try EPSV command. When set to FALSE to disable EPSV command. | |
CURLOPT_FTPAPPEND | Additional write file instead of overwriting it enabled. | |
CURLOPT_FTPASCII | CURLOPT_TRANSFERTEXT alias. | |
CURLOPT_FTPLISTONLY | List only the name of the FTP directory is enabled. | |
CURLOPT_HEADER | When you enable message header will be output as a data stream. | |
CURLINFO_HEADER_OUT | Tracking enabled handle request string. | Available since PHP 5.1.3. CURLINFO_ prefix is deliberate (intentional). |
CURLOPT_HTTPGET | The setting will enable the HTTP method is GET, since GET is the default, so use only in case of being modified. | |
CURLOPT_HTTPPROXYTUNNEL | It will be transmitted through the HTTP proxy is enabled. | |
CURLOPT_MUTE | The cURL function all modified parameters to restore the default value is enabled. | |
CURLOPT_NETRC | After the connection is established, access ~ / .netrc file for the user name and password information to connect remote sites. | |
CURLOPT_NOBODY | Will not be part of the HTML BODY output is enabled. | |
CURLOPT_NOPROGRESS | Close enabled curl transmission progress bar, this is enabled by default.
| |
CURLOPT_NOSIGNAL | Ignore all of the signal is passed to the php curl enabled performed. This is enabled by default when SAPI multithreaded transfer. | cURL 7.10 when added. |
CURLOPT_POST | When enabled sends a normal POST request, type: application / x-www-form -urlencoded, just like form submission. | |
CURLOPT_PUT | Allow HTTP send a file, you must set CURLOPT_INFILE and CURLOPT_INFILESIZE simultaneously enabled. | |
CURLOPT_RETURNTRANSFER | The curl_exec () returns the information obtained in the form of file stream, instead of being output. | |
CURLOPT_SSL_VERIFYPEER | After disabling cURL will be terminated from the server to verify. Use CURLOPT_CAINFO option certificates CURLOPT_CAPATH option certificates catalog If CURLOPT_SSL_VERIFYPEER (2 by default) is enabled, CURLOPT_SSL_VERIFYHOST needs to be set to TRUE, otherwise it is set to FALSE. | CURL 7.10 since the beginning of the default is TRUE. From the beginning of the default binding install cURL 7.10. |
CURLOPT_TRANSFERTEXT | Use ASCII mode for FTP transfers enabled. For LDAP, it retrieves the information in plain text rather than HTML. On Windows systems, the system will not set STDOUT to binary mode. | |
CURLOPT_UNRESTRICTED_AUTH | Using CURLOPT_FOLLOWLOCATION generated header multiple locations continuously append the user name and password information, even if the domain name has been changed. | |
CURLOPT_UPLOAD | When enabled allows file uploads. | |
CURLOPT_VERBOSE | Will report enabled all the information stored in STDERR or designated CURLOPT_STDERR in. |
return value
Successful return TRUE, or on failure returns FALSE.