CURLOPT_BUFFERSIZE |
The size of the buffer to use for each read. There is no guarantee
this request will be fulfilled, however.
|
Added in cURL 7.10.
|
CURLOPT_CLOSEPOLICY |
One of the CURLCLOSEPOLICY_* values.
Note:
This option is deprecated, as it was never implemented in cURL and
never had any effect.
|
Removed in PHP 5.6.0.
|
CURLOPT_CONNECTTIMEOUT |
The number of seconds to wait while trying to connect. Use 0 to
wait indefinitely.
|
|
CURLOPT_CONNECTTIMEOUT_MS |
The number of milliseconds to wait while trying to connect. Use 0 to
wait indefinitely.
If libcurl is built to use the standard system name resolver, that
portion of the connect will still use full-second resolution for
timeouts with a minimum timeout allowed of one second.
|
Added in cURL 7.16.2. Available since PHP 5.2.3.
|
CURLOPT_DNS_CACHE_TIMEOUT |
The number of seconds to keep DNS entries in memory. This
option is set to 120 (2 minutes) by default.
|
|
CURLOPT_EXPECT_100_TIMEOUT_MS |
The timeout for Expect: 100-continue responses in milliseconds.
Defaults to 1000 milliseconds.
|
Added in cURL 7.36.0. Available since PHP 7.0.7.
|
CURLOPT_FTPSSLAUTH |
The FTP authentication method (when is activated):
CURLFTPAUTH_SSL (try SSL first),
CURLFTPAUTH_TLS (try TLS first), or
CURLFTPAUTH_DEFAULT (let cURL decide).
|
Added in cURL 7.12.2.
|
CURLOPT_HEADEROPT |
How to deal with headers. One of the following constants:
CURLHEADER_UNIFIED : the headers specified in
CURLOPT_HTTPHEADER will be used in requests
both to servers and proxies. With this option enabled,
CURLOPT_PROXYHEADER will not have any effect.
CURLHEADER_SEPARATE : makes
CURLOPT_HTTPHEADER headers only get sent to
a server and not to a proxy. Proxy headers must be set with
CURLOPT_PROXYHEADER to get used. Note that if
a non-CONNECT request is sent to a proxy, libcurl will send both
server headers and proxy headers. When doing CONNECT, libcurl will
send CURLOPT_PROXYHEADER headers only to the
proxy and then CURLOPT_HTTPHEADER headers
only to the server.
Defaults to CURLHEADER_SEPARATE as of cURL
7.42.1, and CURLHEADER_UNIFIED before.
|
Added in cURL 7.37.0. Available since PHP 7.0.7.
|
CURLOPT_HTTP_VERSION |
CURL_HTTP_VERSION_NONE (default, lets CURL
decide which version to use),
CURL_HTTP_VERSION_1_0 (forces HTTP/1.0),
or CURL_HTTP_VERSION_1_1 (forces HTTP/1.1).
|
|
CURLOPT_HTTPAUTH |
The HTTP authentication method(s) to use. The options are:
CURLAUTH_BASIC ,
CURLAUTH_DIGEST ,
CURLAUTH_GSSNEGOTIATE ,
CURLAUTH_NTLM ,
CURLAUTH_ANY , and
CURLAUTH_ANYSAFE .
The bitwise | (or) operator can be used to combine
more than one method. If this is done, cURL will poll the server to see
what methods it supports and pick the best one.
CURLAUTH_ANY is an alias for
CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM.
CURLAUTH_ANYSAFE is an alias for
CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM.
|
|
CURLOPT_INFILESIZE |
The expected size, in bytes, of the file when uploading a file to
a remote site. Note that using this option will not stop libcurl
from sending more data, as exactly what is sent depends on
CURLOPT_READFUNCTION .
|
|
CURLOPT_LOW_SPEED_LIMIT |
The transfer speed, in bytes per second, that the transfer should be
below during the count of CURLOPT_LOW_SPEED_TIME
seconds before PHP considers the transfer too slow and aborts.
|
|
CURLOPT_LOW_SPEED_TIME |
The number of seconds the transfer speed should be below
CURLOPT_LOW_SPEED_LIMIT before PHP considers
the transfer too slow and aborts.
|
|
CURLOPT_MAXCONNECTS |
The maximum amount of persistent connections that are allowed.
When the limit is reached,
CURLOPT_CLOSEPOLICY is used to determine
which connection to close.
|
|
CURLOPT_MAXREDIRS |
The maximum amount of HTTP redirections to follow. Use this option
alongside CURLOPT_FOLLOWLOCATION .
|
|
CURLOPT_PORT |
An alternative port number to connect to.
|
|
CURLOPT_POSTREDIR |
A bitmask of 1 (301 Moved Permanently), 2 (302 Found)
and 4 (303 See Other) if the HTTP POST method should be maintained
when CURLOPT_FOLLOWLOCATION is set and a
specific type of redirect occurs.
|
Added in cURL 7.19.1. Available since PHP 5.3.2.
|
CURLOPT_PROTOCOLS |
Bitmask of CURLPROTO_* values. If used, this bitmask
limits what protocols libcurl may use in the transfer. This allows you to have
a libcurl built to support a wide range of protocols but still limit specific
transfers to only be allowed to use a subset of them. By default libcurl will
accept all protocols it supports.
See also CURLOPT_REDIR_PROTOCOLS .
Valid protocol options are:
CURLPROTO_HTTP ,
CURLPROTO_HTTPS ,
CURLPROTO_FTP ,
CURLPROTO_FTPS ,
CURLPROTO_SCP ,
CURLPROTO_SFTP ,
CURLPROTO_TELNET ,
CURLPROTO_LDAP ,
CURLPROTO_LDAPS ,
CURLPROTO_DICT ,
CURLPROTO_FILE ,
CURLPROTO_TFTP ,
CURLPROTO_ALL
|
Added in cURL 7.19.4.
|
CURLOPT_PROXYAUTH |
The HTTP authentication method(s) to use for the proxy connection.
Use the same bitmasks as described in
CURLOPT_HTTPAUTH . For proxy authentication,
only CURLAUTH_BASIC and
CURLAUTH_NTLM are currently supported.
|
Added in cURL 7.10.7.
|
CURLOPT_PROXYPORT |
The port number of the proxy to connect to. This port number can
also be set in CURLOPT_PROXY .
|
|
CURLOPT_PROXYTYPE |
Either CURLPROXY_HTTP (default),
CURLPROXY_SOCKS4 ,
CURLPROXY_SOCKS5 ,
CURLPROXY_SOCKS4A or
CURLPROXY_SOCKS5_HOSTNAME .
|
Added in cURL 7.10.
|
CURLOPT_REDIR_PROTOCOLS |
Bitmask of CURLPROTO_* values. If used, this bitmask
limits what protocols libcurl may use in a transfer that it follows to in
a redirect when CURLOPT_FOLLOWLOCATION is enabled.
This allows you to limit specific transfers to only be allowed to use a subset
of protocols in redirections. By default libcurl will allow all protocols
except for FILE and SCP. This is a difference compared to pre-7.19.4 versions
which unconditionally would follow to all protocols supported.
See also CURLOPT_PROTOCOLS for protocol constant values.
|
Added in cURL 7.19.4.
|
CURLOPT_RESUME_FROM |
The offset, in bytes, to resume a transfer from.
|
|
CURLOPT_SSL_OPTIONS |
Set SSL behavior options, which is a bitmask of any of the following constants:
CURLSSLOPT_ALLOW_BEAST : do not attempt to use
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
CURLSSLOPT_NO_REVOKE : disable certificate
revocation checks for those SSL backends where such behavior is
present.
|
Added in cURL 7.25.0. Available since PHP 7.0.7.
|
CURLOPT_SSL_VERIFYHOST |
1 to check the existence of a common name in the
SSL peer certificate. 2 to check the existence of
a common name and also verify that it matches the hostname
provided. In production environments the value of this option
should be kept at 2 (default value).
|
Support for value 1 removed in cURL 7.28.1
|
CURLOPT_SSLVERSION |
One of CURL_SSLVERSION_DEFAULT (0),
CURL_SSLVERSION_TLSv1 (1),
CURL_SSLVERSION_SSLv2 (2),
CURL_SSLVERSION_SSLv3 (3),
CURL_SSLVERSION_TLSv1_0 (4),
CURL_SSLVERSION_TLSv1_1 (5) or
CURL_SSLVERSION_TLSv1_2 (6).
Note:
Your best bet is to not set this and let it use the default.
Setting it to 2 or 3 is very dangerous given the known
vulnerabilities in SSLv2 and SSLv3.
|
|
CURLOPT_STREAM_WEIGHT |
Set the numerical stream weight (a number between 1 and 256).
|
Added in cURL 7.46.0. Available since PHP 7.0.7.
|
CURLOPT_TIMECONDITION |
How CURLOPT_TIMEVALUE is treated.
Use CURL_TIMECOND_IFMODSINCE to return the
page only if it has been modified since the time specified in
CURLOPT_TIMEVALUE . If it hasn't been modified,
a "304 Not Modified" header will be returned
assuming CURLOPT_HEADER is TRUE .
Use CURL_TIMECOND_IFUNMODSINCE for the reverse
effect. CURL_TIMECOND_IFMODSINCE is the
default.
|
|
CURLOPT_TIMEOUT |
The maximum number of seconds to allow cURL functions to execute.
|
|
CURLOPT_TIMEOUT_MS |
The maximum number of milliseconds to allow cURL functions to
execute.
If libcurl is built to use the standard system name resolver, that
portion of the connect will still use full-second resolution for
timeouts with a minimum timeout allowed of one second.
|
Added in cURL 7.16.2. Available since PHP 5.2.3.
|
CURLOPT_TIMEVALUE |
The time in seconds since January 1st, 1970. The time will be used
by CURLOPT_TIMECONDITION . By default,
CURL_TIMECOND_IFMODSINCE is used.
|
|
CURLOPT_MAX_RECV_SPEED_LARGE |
If a download exceeds this speed (counted in bytes per second) on
cumulative average during the transfer, the transfer will pause to
keep the average rate less than or equal to the parameter value.
Defaults to unlimited speed.
|
Added in cURL 7.15.5. Available since PHP 5.4.0.
|
CURLOPT_MAX_SEND_SPEED_LARGE |
If an upload exceeds this speed (counted in bytes per second) on
cumulative average during the transfer, the transfer will pause to
keep the average rate less than or equal to the parameter value.
Defaults to unlimited speed.
|
Added in cURL 7.15.5. Available since PHP 5.4.0.
|
CURLOPT_SSH_AUTH_TYPES |
A bitmask consisting of one or more of
CURLSSH_AUTH_PUBLICKEY ,
CURLSSH_AUTH_PASSWORD ,
CURLSSH_AUTH_HOST ,
CURLSSH_AUTH_KEYBOARD . Set to
CURLSSH_AUTH_ANY to let libcurl pick one.
|
Added in cURL 7.16.1.
|
CURLOPT_IPRESOLVE |
Allows an application to select what kind of IP addresses to use when
resolving host names. This is only interesting when using host names that
resolve addresses using more than one version of IP, possible values are
CURL_IPRESOLVE_WHATEVER ,
CURL_IPRESOLVE_V4 ,
CURL_IPRESOLVE_V6 , by default
CURL_IPRESOLVE_WHATEVER .
|
Added in cURL 7.10.8.
|
CURLOPT_FTP_FILEMETHOD |
Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
CURLFTPMETHOD_MULTICWD ,
CURLFTPMETHOD_NOCWD and
CURLFTPMETHOD_SINGLECWD .
|
Added in cURL 7.15.1. Available since PHP 5.3.0.
|