跳转到主要内容

constants

ENTITY ENTITY

Descriptions and uses for these constants are described within the curl_setopt, curl_multi_setopt and curl_getinfo documentation.

CURLALTSVC_H1 (int)
Available as of PHP 8.2.0 and cURL 7.64.1.

CURLALTSVC_H2 (int)
Available as of PHP 8.2.0 and cURL 7.64.1.

CURLALTSVC_H3 (int)
Available as of PHP 8.2.0 and cURL 7.64.1.

CURLALTSVC_READONLYFILE (int)
Available as of PHP 8.2.0 and cURL 7.64.1.

CURLAUTH_ANY (int)

CURLAUTH_ANYSAFE (int)

CURLAUTH_AWS_SIGV4 (int)
Available as of PHP 8.2.0 and cURL 7.75.0.

CURLAUTH_BASIC (int)

CURLAUTH_BEARER (int)
Available as of PHP 7.3.0 and cURL 7.61.0.

CURLAUTH_DIGEST (int)

CURLAUTH_DIGEST_IE (int)
Use HTTP Digest authentication with an IE flavor. Available as of cURL 7.19.3.

CURLAUTH_GSSAPI (int)
Available as of PHP 7.3.0 and cURL 7.54.1

CURLAUTH_GSSNEGOTIATE (int)

CURLAUTH_NEGOTIATE (int)
Available as of PHP 7.0.7 and cURL 7.38.0.

CURLAUTH_NONE (int)
Available as of cURL 7.10.6.

CURLAUTH_NTLM (int)

CURLAUTH_NTLM_WB (int)
Available as of PHP 7.0.7 and cURL 7.22.0

CURLAUTH_ONLY (int)
This is a meta symbol. OR this value together with a single specific auth value to force libcurl to probe for unrestricted auth and if not, only that single auth algorithm is acceptable. Available as of cURL 7.21.3.

CURLFOLLOW_ALL (int)
Value for CURLOPT_FOLLOWLOCATION that enables following redirects and keeps a custom request method set with CURLOPT_CUSTOMREQUEST in use for all requests, even after redirects. Available as of PHP 8.5.0 and cURL 8.13.0.

CURLFOLLOW_OBEYCODE (int)
Value for CURLOPT_FOLLOWLOCATION that enables following redirects while obeying the HTTP response code: a custom request method set with CURLOPT_CUSTOMREQUEST is kept, except that it is changed to GET on the redirect status codes that require it (such as 301, 302 and 303). Available as of PHP 8.5.0 and cURL 8.13.0.

CURLFOLLOW_FIRSTONLY (int)
Value for CURLOPT_FOLLOWLOCATION that enables following redirects but uses a custom request method set with CURLOPT_CUSTOMREQUEST for the first request only; subsequent requests follow the method dictated by the redirect response code. Available as of PHP 8.5.0 and cURL 8.13.0.

CURLFTPAUTH_DEFAULT (int)

CURLFTPAUTH_SSL (int)

CURLFTPAUTH_TLS (int)

CURLFTPMETHOD_DEFAULT (int)
Available as of PHP 8.2.0 and cURL 7.15.3.

CURLFTPMETHOD_MULTICWD (int)
Do a single CWD operation for each path part in the given URL. Available as of cURL 7.15.3.

CURLFTPMETHOD_NOCWD (int)
libcurl makes no CWD at all. libcurl does SIZE, RETR, STOR etc. and gives a full path to the server for all these commands. Available as of cURL 7.15.3.

CURLFTPMETHOD_SINGLECWD (int)
libcurl does one CWD with the full target directory and then operates on the file like in the multicwd case. Available as of cURL 7.15.3.

CURLFTPSSL_ALL (int)

CURLFTPSSL_CCC_ACTIVE (int)
Initiate the shutdown and wait for a reply. Available as of cURL 7.16.2.

CURLFTPSSL_CCC_NONE (int)
Do not attempt to use CCC (Clear Command Channel). Available as of cURL 7.16.2.

CURLFTPSSL_CCC_PASSIVE (int)
Do not initiate the shutdown, but wait for the server to do it. Do not send a reply. Available as of cURL 7.16.1.

CURLFTPSSL_CONTROL (int)

CURLFTPSSL_NONE (int)

CURLFTPSSL_TRY (int)

CURLFTP_CREATE_DIR (int)
Available as of PHP 7.0.7 and cURL 7.19.3

CURLFTP_CREATE_DIR_NONE (int)
Available as of PHP 7.0.7 and cURL 7.19.3

CURLFTP_CREATE_DIR_RETRY (int)
Available as of PHP 7.0.7 and cURL 7.19.3

CURLGSSAPI_DELEGATION_FLAG (int)
Allow unconditional GSSAPI credential delegation. Available as of cURL 7.22.0.

CURLGSSAPI_DELEGATION_POLICY_FLAG (int)
Delegate only if the OK-AS-DELEGATE flag is set in the service ticket if this feature is supported by the GSS-API implementation and the definition of GSS_C_DELEG_POLICY_FLAG was available at compile-time. Available as of cURL 7.22.0.

CURLHEADER_SEPARATE (int)
Available as of PHP 7.0.7 and cURL 7.37.0.

CURLHEADER_UNIFIED (int)
Available as of PHP 7.0.7 and cURL 7.37.0.

CURLHSTS_ENABLE (int)
Available as of PHP 8.2.0 and cURL 7.74.0

CURLHSTS_READONLYFILE (int)
Available as of PHP 8.2.0 and cURL 7.74.0

CURLKHMATCH_LAST (int)
Available as of PHP 8.3.0 and cURL 7.19.6

CURLKHMATCH_MISMATCH (int)
Available as of PHP 8.3.0 and cURL 7.19.6

CURLKHMATCH_MISSING (int)
Available as of PHP 8.3.0 and cURL 7.19.6

CURLKHMATCH_OK (int)
Available as of PHP 8.3.0 and cURL 7.19.6

CURLMIMEOPT_FORMESCAPE (int)
Available as of PHP 8.3.0 and cURL 7.81.0

CURLMSG_DONE (int)

CURLPIPE_HTTP1 (int)
Available as of cURL 7.43.0.

CURLPIPE_MULTIPLEX (int)
Available as of cURL 7.43.0.

CURLPIPE_NOTHING (int)
Available as of cURL 7.43.0.

CURLPROXY_HTTP (int)
Available as of cURL 7.10.

CURLPROXY_HTTPS (int)
Available as of PHP 7.3.0 and cURL 7.52.0

CURLPROXY_HTTP_1_0 (int)
Available as of PHP 7.0.7 and cURL 7.19.3

CURLPROXY_SOCKS4 (int)
Available as of cURL 7.10.

CURLPROXY_SOCKS4A (int)
Available as of cURL 7.18.0.

CURLPROXY_SOCKS5 (int)
Available as of cURL 7.10.

CURLPROXY_SOCKS5_HOSTNAME (int)
Available as of cURL 7.18.0.

CURLPX_BAD_ADDRESS_TYPE (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_BAD_VERSION (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_CLOSED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_GSSAPI (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_GSSAPI_PERMSG (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_GSSAPI_PROTECTION (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_IDENTD (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_IDENTD_DIFFER (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_LONG_HOSTNAME (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_LONG_PASSWD (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_LONG_USER (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_NO_AUTH (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_OK (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_RECV_ADDRESS (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_RECV_AUTH (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_RECV_CONNECT (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_RECV_REQACK (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_COMMAND_NOT_SUPPORTED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_CONNECTION_REFUSED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_GENERAL_SERVER_FAILURE (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_HOST_UNREACHABLE (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_NETWORK_UNREACHABLE (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_NOT_ALLOWED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_TTL_EXPIRED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REPLY_UNASSIGNED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_REQUEST_FAILED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_RESOLVE_HOST (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_SEND_AUTH (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_SEND_CONNECT (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_SEND_REQUEST (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_UNKNOWN_FAIL (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_UNKNOWN_MODE (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLPX_USER_REJECTED (int)
Available as of PHP 8.2.0 and cURL 7.73.0

CURLSSH_AUTH_AGENT (int)
Available as of PHP 7.0.7 and cURL 7.28.0

CURLSSH_AUTH_ANY (int)

CURLSSH_AUTH_DEFAULT (int)

CURLSSH_AUTH_GSSAPI (int)
Available as of PHP 7.3.0 and cURL 7.58.0

CURLSSH_AUTH_HOST (int)

CURLSSH_AUTH_KEYBOARD (int)

CURLSSH_AUTH_NONE (int)

CURLSSH_AUTH_PASSWORD (int)

CURLSSH_AUTH_PUBLICKEY (int)

CURLSSLOPT_ALLOW_BEAST (int)
Available as of cURL 7.25.0

CURLSSLOPT_AUTO_CLIENT_CERT (int)
Available as of PHP 8.2.0 and cURL 7.77.0

CURLSSLOPT_NATIVE_CA (int)
Available as of PHP 8.2.0 and cURL 7.71.0

CURLSSLOPT_NO_PARTIALCHAIN (int)
Available as of PHP 8.2.0 and cURL 7.68.0

CURLSSLOPT_NO_REVOKE (int)
Available as of PHP 7.0.7 and cURL 7.44.0

CURLSSLOPT_REVOKE_BEST_EFFORT (int)
Available as of PHP 8.2.0 and cURL 7.70.0

CURLUSESSL_ALL (int)
Require SSL for all communication or fail with CURLE_USE_SSL_FAILED. Available as of cURL 7.17.0.

CURLUSESSL_CONTROL (int)
Require SSL for the control connection or fail with CURLE_USE_SSL_FAILED. Available as of cURL 7.17.0.

CURLUSESSL_NONE (int)
Do not attempt to use SSL. Available as of cURL 7.17.0.

CURLUSESSL_TRY (int)
Try using SSL, proceed as normal otherwise. Note that server may close the connection if the negotiation does not succeed. Available as of cURL 7.17.0.

CURLVERSION_NOW (int)

CURLWS_RAW_MODE (int)
Available as of PHP 8.3.0 and cURL 7.86.0

CURL_FNMATCHFUNC_FAIL (int)
Returned by the wildcard match callback function if an error occurred. Available as of cURL 7.21.0.

CURL_FNMATCHFUNC_MATCH (int)
Returned by the wildcard match callback function if pattern matches the string. Available as of cURL 7.21.0.

CURL_FNMATCHFUNC_NOMATCH (int)
Returned by the wildcard match callback function if pattern does not match the string. Available as of cURL 7.21.0.

CURL_HTTP_VERSION_1_0 (int)

CURL_HTTP_VERSION_1_1 (int)

CURL_HTTP_VERSION_2 (int)
Available as of PHP 7.0.7 and cURL 7.43.0

CURL_HTTP_VERSION_2TLS (int)
Available as of PHP 7.0.7 and cURL 7.47.0

CURL_HTTP_VERSION_2_0 (int)
Available as of cURL 7.33.0

CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE (int)
Available as of PHP 7.0.7 and cURL 7.49.0

CURL_HTTP_VERSION_3 (int)
Available as of PHP 8.4.0 and cURL 7.66.0.

CURL_HTTP_VERSION_3ONLY (int)
Available as of PHP 8.4.0 and cURL 7.88.0.

CURL_HTTP_VERSION_NONE (int)

CURL_IPRESOLVE_V4 (int)
Use only IPv4 addresses when establishing a connection or choosing one from the connection pool. Available as of cURL 7.10.8.

CURL_IPRESOLVE_V6 (int)
Use only IPv6 addresses when establishing a connection or choosing one from the connection pool. Available as of cURL 7.10.8.

CURL_IPRESOLVE_WHATEVER (int)
Use addresses of all IP versions allowed by the system. Available as of cURL 7.10.8.

CURL_MAX_READ_SIZE (int)
Available as of PHP 7.3.0 and cURL 7.53.0

CURL_NETRC_IGNORED (int)

CURL_NETRC_OPTIONAL (int)

CURL_NETRC_REQUIRED (int)

CURL_PUSH_DENY (int)
Available as of PHP 7.1.0 and cURL 7.44.0

CURL_PUSH_OK (int)
Available as of PHP 7.1.0 and cURL 7.44.0

CURL_READFUNC_PAUSE (int)
Available as of cURL 7.18.0.

CURL_REDIR_POST_301 (int)
Available as of PHP 7.0.7 and cURL 7.18.2

CURL_REDIR_POST_302 (int)
Available as of PHP 7.0.7 and cURL 7.18.2

CURL_REDIR_POST_303 (int)
Available as of PHP 7.0.7 and cURL 7.25.1

CURL_REDIR_POST_ALL (int)
Available as of PHP 7.0.7 and cURL 7.18.2

CURL_RTSPREQ_ANNOUNCE (int)
When sent by a client, this method changes the description of the session. ANNOUNCE acts like an HTTP PUT or POST just like CURL_RTSPREQ_SET_PARAMETER. Available as of cURL 7.20.0.

CURL_RTSPREQ_DESCRIBE (int)
Used to get the low level description of a stream. The application should note what formats it understands in the Accept: header. Unless set manually, libcurl automatically adds in Accept: application/sdp. Time-condition headers are added to DESCRIBE requests if the CURLOPT_TIMECONDITION option is used. Available as of cURL 7.20.0.

CURL_RTSPREQ_GET_PARAMETER (int)
Retrieve a parameter from the server. By default, libcurl adds a Content-Type: text/parameters header on all non-empty requests unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST. Applications wishing to send a heartbeat message should use an empty GET_PARAMETER request. Available as of cURL 7.20.0.

CURL_RTSPREQ_OPTIONS (int)
Used to retrieve the available methods of the server. Available as of cURL 7.20.0.

CURL_RTSPREQ_PAUSE (int)
Send a PAUSE command to the server. Use the CURLOPT_RANGE option with a single value to indicate when the stream should be halted (e.g. npt=25). Available as of cURL 7.20.0.

CURL_RTSPREQ_PLAY (int)
Send a PLAY command to the server. Use the CURLOPT_RANGE option to modify the playback time (e.g. npt=10-15). Available as of cURL 7.20.0.

CURL_RTSPREQ_RECEIVE (int)
Set the RTSP request type to this value to receive interleaved RTP data. Available as of cURL 7.20.0.

CURL_RTSPREQ_RECORD (int)
Used to tell the server to record a session. Use the CURLOPT_RANGE option to modify the record time. Available as of cURL 7.20.0.

CURL_RTSPREQ_SETUP (int)
Used to initialize the transport layer for the session. Available as of cURL 7.20.0.

CURL_RTSPREQ_SET_PARAMETER (int)
Set a parameter on the server. Available as of cURL 7.20.0.

CURL_RTSPREQ_TEARDOWN (int)
Terminates an RTSP session. Simply closing a connection does not terminate the RTSP session since it is valid to control an RTSP session over different connections. Available as of cURL 7.20.0.

CURL_SSLVERSION_DEFAULT (int)

CURL_SSLVERSION_MAX_DEFAULT (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_MAX_NONE (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_MAX_TLSv1_0 (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_MAX_TLSv1_1 (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_MAX_TLSv1_2 (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_MAX_TLSv1_3 (int)
Available as of PHP 7.3.0 and cURL 7.54.0

CURL_SSLVERSION_SSLv2 (int)

CURL_SSLVERSION_SSLv3 (int)

CURL_SSLVERSION_TLSv1 (int)

CURL_SSLVERSION_TLSv1_0 (int)

CURL_SSLVERSION_TLSv1_1 (int)

CURL_SSLVERSION_TLSv1_2 (int)

CURL_SSLVERSION_TLSv1_3 (int)
Available as of PHP 7.3.0 and cURL 7.52.0

CURL_TIMECOND_IFMODSINCE (int)

CURL_TIMECOND_IFUNMODSINCE (int)

CURL_TIMECOND_LASTMOD (int)

CURL_TIMECOND_NONE (int)

CURL_TLSAUTH_SRP (int)
Available as of cURL 7.21.4.

CURL_VERSION_ALTSVC (int)
Available as of PHP 7.3.6 and cURL 7.64.1

CURL_VERSION_ASYNCHDNS (int)
Asynchronous DNS resolves. Available as of PHP 7.3.0 and cURL 7.10.7

CURL_VERSION_BROTLI (int)
Available as of PHP 7.3.0 and cURL 7.57.0

CURL_VERSION_CONV (int)
Character conversions supported. Available as of PHP 7.3.0 and cURL 7.15.4

CURL_VERSION_CURLDEBUG (int)
Debug memory tracking supported. Available as of PHP 7.3.6 and cURL 7.19.6

CURL_VERSION_DEBUG (int)
Built with debug capabilities. Available as of PHP 7.3.0 and cURL 7.10.6

CURL_VERSION_GSASL (int)
Available as of PHP 8.2.0 and cURL 7.76.0

CURL_VERSION_GSSAPI (int)
Built against a GSS-API library. Available as of PHP 7.3.0 and cURL 7.38.0

CURL_VERSION_GSSNEGOTIATE (int)
Negotiate auth is supported. Available as of PHP 7.3.0 and cURL 7.10.6 (deprecated as of cURL 7.38.0)

CURL_VERSION_HSTS (int)
Available as of PHP 8.2.0 and cURL 7.74.0

CURL_VERSION_HTTP2 (int)
HTTP2 support built-in. Available as of cURL 7.33.0

CURL_VERSION_HTTP3 (int)
Available as of PHP 8.2.0 and cURL 7.66.0

CURL_VERSION_HTTPS_PROXY (int)
Available as of PHP 7.3.0 and cURL 7.52.0

CURL_VERSION_IDN (int)
Internationalized Domain Names are supported. Available as of PHP 7.3.0 and cURL 7.12.0

CURL_VERSION_IPV6 (int)
IPv6-enabled.

CURL_VERSION_KERBEROS4 (int)
Kerberos V4 auth is supported.

CURL_VERSION_KERBEROS5 (int)
Kerberos V5 auth is supported. Available as of PHP 7.0.7 and cURL 7.40.0

CURL_VERSION_LARGEFILE (int)
Supports files larger than 2GB. Available as of cURL 7.33.0

CURL_VERSION_LIBZ (int)
libz features are present.

CURL_VERSION_MULTI_SSL (int)
Available as of PHP 7.3.0 and cURL 7.56.0

CURL_VERSION_NTLM (int)
NTLM auth is supported. Available as of PHP 7.3.0 and cURL 7.10.6

CURL_VERSION_NTLM_WB (int)
NTLM delegation to winbind helper is supported. Available as of PHP 7.3.0 and cURL 7.22.0

CURL_VERSION_PSL (int)
Mozilla's Public Suffix List, used for cookie domain verification. Available as of PHP 7.3.6 and cURL 7.47.0

CURL_VERSION_SPNEGO (int)
SPNEGO auth is supported. Available as of PHP 7.3.0 and cURL 7.10.8

CURL_VERSION_SSL (int)
SSL options are present.

CURL_VERSION_SSPI (int)
Built against Windows SSPI. Available as of PHP 7.3.0 and cURL 7.13.2

CURL_VERSION_TLSAUTH_SRP (int)
TLS-SRP auth is supported. Available as of PHP 7.3.0 and cURL 7.21.4

CURL_VERSION_UNICODE (int)
Available as of PHP 8.2.0 and cURL 7.72.0

CURL_VERSION_UNIX_SOCKETS (int)
Unix domain sockets support. Available as of PHP 7.0.7 and cURL 7.40.0

CURL_VERSION_ZSTD (int)
Available as of PHP 8.2.0 and cURL 7.72.0

CURL_WRITEFUNC_PAUSE (int)
Available as of cURL 7.18.0.

CURL_PREREQFUNC_OK (int)
Available as of PHP 8.4.0 and cURL 7.80.0.

CURL_PREREQFUNC_ABORT (int)
Available as of PHP 8.4.0 and cURL 7.80.0.

ENTITY ENTITY ENTITY ENTITY ENTITY ENTITY ENTITY ENTITY