下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。
curl_setopt()、curl_multi_setopt()、 curl_getinfo() 文档中常量的描述和使用。
CURLOPT_AUTOREFERER
(int)
CURLOPT_DOH_URL
(int)
CURLOPT_DOH_SSL_VERIFYHOST
(int)
CURLOPT_DOH_SSL_VERIFYPEER
(int)
CURLOPT_DOH_SSL_VERIFYSTATUS
(int)
CURLOPT_DNS_USE_GLOBAL_CACHE
(int)
CURLOPT_DNS_CACHE_TIMEOUT
(int)
CURLOPT_FTP_SSL
(int)
CURLFTP_CREATE_DIR
(int)
CURLFTP_CREATE_DIR_NONE
(int)
CURLFTP_CREATE_DIR_RETRY
(int)
CURLFTPSSL_TRY
(int)
CURLFTPSSL_ALL
(int)
CURLFTPSSL_CONTROL
(int)
CURLFTPSSL_NONE
(int)
CURLFTPMETHOD_DEFAULT
(int)
CURLOPT_PRIVATE
(int)
CURLOPT_FTPSSLAUTH
(int)
CURLOPT_PORT
(int)
CURLOPT_FILE
(int)
CURLOPT_INFILE
(int)
CURLOPT_INFILESIZE
(int)
CURLOPT_ISSUERCERT_BLOB
(int)
CURLOPT_URL
(int)
CURLOPT_PROXY
(int)
CURLOPT_PROXY_ISSUERCERT
(int)
CURLOPT_PROXY_ISSUERCERT_BLOB
(int)
CURLOPT_PROXY_SSLCERT_BLOB
(int)
CURLOPT_PROXY_SSLKEY_BLOB
(int)
CURLOPT_VERBOSE
(int)
CURLOPT_ALTSVC
(int)
CURLOPT_ALTSVC_CTRL
(int)
CURLALTSVC_H1
(int)
CURLALTSVC_H2
(int)
CURLALTSVC_H3
(int)
CURLALTSVC_READONLYFILE
(int)
CURLOPT_HEADER
(int)
CURLOPT_HTTPHEADER
(int)
CURLOPT_NOPROGRESS
(int)
CURLOPT_NOBODY
(int)
CURLOPT_FAILONERROR
(int)
CURLOPT_UPLOAD
(int)
CURLOPT_UPLOAD_BUFFERSIZE
(int)
CURLOPT_POST
(int)
CURLOPT_FTPLISTONLY
(int)
CURLOPT_FTPAPPEND
(int)
CURLOPT_FTP_CREATE_MISSING_DIRS
(int)
CURLOPT_NETRC
(int)
CURLOPT_FOLLOWLOCATION
(int)
CURLOPT_FTPASCII
(int)
CURLOPT_PUT
(int)
CURLOPT_MIME_OPTIONS
(int)
CURLOPT_MUTE
(int)
CURLOPT_RETURNTRANSFER
。
CURLOPT_USERPWD
(int)
CURLOPT_PROXYUSERPWD
(int)
CURLOPT_RANGE
(int)
CURLOPT_TIMEOUT
(int)
CURLOPT_TIMEOUT_MS
(int)
CURLOPT_TCP_NODELAY
(int)
CURLOPT_POSTFIELDS
(int)
CURLOPT_PROGRESSFUNCTION
(int)
CURLOPT_REFERER
(int)
CURLOPT_USERAGENT
(int)
CURLOPT_FTPPORT
(int)
CURLOPT_FTP_USE_EPSV
(int)
CURLOPT_LOW_SPEED_LIMIT
(int)
CURLOPT_LOW_SPEED_TIME
(int)
CURLOPT_RESUME_FROM
(int)
CURLOPT_SSLCERT
(int)
CURLOPT_SSLCERT_BLOB
(int)
CURLOPT_SSLCERTPASSWD
(int)
CURLOPT_SSLKEY_BLOB
(int)
CURLOPT_WRITEHEADER
(int)
CURLOPT_WS_OPTIONS
(int)
CURLOPT_SSL_VERIFYHOST
(int)
CURLOPT_SSLVERSION
(int)
CURL_SSLVERSION_DEFAULT
(int)
CURL_SSLVERSION_TLSv1
(int)
CURL_SSLVERSION_SSLv2
(int)
CURL_SSLVERSION_SSLv3
(int)
CURL_SSLVERSION_TLSv1_0
(int)
CURL_SSLVERSION_TLSv1_1
(int)
CURL_SSLVERSION_TLSv1_2
(int)
CURL_SSLVERSION_TLSv1_3
(int)
CURLOPT_TIMECONDITION
(int)
CURLOPT_TIMEVALUE
(int)
CURLOPT_CUSTOMREQUEST
(int)
CURLOPT_STDERR
(int)
CURLOPT_TRANSFERTEXT
(int)
CURLOPT_RETURNTRANSFER
(int)
CURLOPT_QUICK_EXIT
(int)
CURLOPT_QUOTE
(int)
CURLOPT_POSTQUOTE
(int)
CURLOPT_INTERFACE
(int)
CURLOPT_KRB4LEVEL
(int)
CURLOPT_HTTPPROXYTUNNEL
(int)
CURLOPT_FILETIME
(int)
CURLOPT_WRITEFUNCTION
(int)
CURLOPT_READFUNCTION
(int)
CURLOPT_PASSWDFUNCTION
(int)
CURLOPT_HEADERFUNCTION
(int)
CURLOPT_MAXAGE_CONN
(int)
CURLOPT_MAXFILESIZE_LARGE
(int)
CURLOPT_MAXLIFETIME_CONN
(int)
CURLOPT_MAXREDIRS
(int)
CURLOPT_MAXCONNECTS
(int)
CURLOPT_FRESH_CONNECT
(int)
CURLOPT_FORBID_REUSE
(int)
CURLOPT_RANDOM_FILE
(int)
CURLOPT_EGDSOCKET
(int)
CURLOPT_CONNECTTIMEOUT
(int)
CURLOPT_CONNECTTIMEOUT_MS
(int)
CURLOPT_SSL_VERIFYPEER
(int)
CURLOPT_CA_CACHE_TIMEOUT
(int)
CURLOPT_CAINFO
(int)
CURLOPT_CAINFO_BLOB
(int)
CURLOPT_CAPATH
(int)
CURLOPT_SSL_CIPHER_LIST
(int)
CURLOPT_SSL_EC_CURVES
(int)
CURLOPT_BINARYTRANSFER
(int)
CURLOPT_NOSIGNAL
(int)
CURLOPT_PROXYTYPE
(int)
CURLOPT_BUFFERSIZE
(int)
CURLOPT_HTTPGET
(int)
CURLOPT_HTTP_VERSION
(int)
CURLOPT_HSTS
(int)
CURLOPT_HSTS_CTRL
(int)
CURLHSTS_ENABLE
(int)
CURLHSTS_READONLYFILE
(int)
CURLOPT_SSLKEY
(int)
CURLOPT_SSLKEYTYPE
(int)
CURLOPT_SSLKEYPASSWD
(int)
CURLOPT_SSLENGINE
(int)
CURLOPT_SSLENGINE_DEFAULT
(int)
CURLOPT_SSLCERTTYPE
(int)
CURLOPT_CRLF
(int)
CURLOPT_ENCODING
(int)
CURLOPT_PROXYPORT
(int)
CURLOPT_UNRESTRICTED_AUTH
(int)
CURLOPT_FTP_USE_EPRT
(int)
CURLOPT_HTTP200ALIASES
(int)
CURLOPT_HTTPAUTH
(int)
CURLOPT_AWS_SIGV4
(int)
CURLAUTH_BASIC
(int)
CURLAUTH_DIGEST
(int)
CURLAUTH_GSSNEGOTIATE
(int)
CURLAUTH_NEGOTIATE
(int)
CURLAUTH_NTLM
(int)
CURLAUTH_NTLM_WB
(int)
CURLAUTH_ANY
(int)
CURLAUTH_ANYSAFE
(int)
CURLAUTH_AWS_SIGV4
(int)
CURLOPT_PROXYAUTH
(int)
CURLOPT_MAIL_RCPT_ALLLOWFAILS
(int)
CURLOPT_UPKEEP_INTERVAL_MS
(int)
CURLOPT_MAX_RECV_SPEED_LARGE
(int)
CURLOPT_MAX_SEND_SPEED_LARGE
(int)
CURLOPT_HEADEROPT
(int)
CURLOPT_PROXYHEADER
(int)
CURLPX_BAD_ADDRESS_TYPE
(int)
CURLPX_BAD_VERSION
(int)
CURLPX_CLOSED
(int)
CURLPX_GSSAPI
(int)
CURLPX_GSSAPI_PERMSG
(int)
CURLPX_GSSAPI_PROTECTION
(int)
CURLPX_IDENTD_DIFFER
(int)
CURLPX_IDENTD
(int)
CURLPX_LONG_HOSTNAME
(int)
CURLPX_LONG_PASSWD
(int)
CURLPX_LONG_USER
(int)
CURLPX_NO_AUTH
(int)
CURLPX_OK
(int)
CURLPX_RECV_ADDRESS
(int)
CURLPX_RECV_AUTH
(int)
CURLPX_RECV_CONNECT
(int)
CURLPX_RECV_REQACK
(int)
CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED
(int)
CURLPX_REPLY_COMMAND_NOT_SUPPORTED
(int)
CURLPX_REPLY_CONNECTION_REFUSED
(int)
CURLPX_REPLY_GENERAL_SERVER_FAILURE
(int)
CURLPX_REPLY_HOST_UNREACHABLE
(int)
CURLPX_REPLY_NETWORK_UNREACHABLE
(int)
CURLPX_REPLY_NOT_ALLOWED
(int)
CURLPX_REPLY_TTL_EXPIRED
(int)
CURLPX_REPLY_UNASSIGNED
(int)
CURLPX_REQUEST_FAILED
(int)
CURLPX_RESOLVE_HOST
(int)
CURLPX_SEND_AUTH
(int)
CURLPX_SEND_CONNECT
(int)
CURLPX_SEND_REQUEST
(int)
CURLPX_UNKNOWN_FAIL
(int)
CURLPX_UNKNOWN_MODE
(int)
CURLPX_USER_REJECTED
(int)
CURL_PUSH_OK
(int)
CURL_PUSH_DENY
(int)
CURL_REDIR_POST_301
(int)
CURL_REDIR_POST_302
(int)
CURL_REDIR_POST_303
(int)
CURL_REDIR_POST_ALL
(int)
CURL_TIMECOND_NONE
(int)
CURL_TIMECOND_IFMODSINCE
(int)
CURL_TIMECOND_IFUNMODSINCE
(int)
CURL_TIMECOND_LASTMOD
(int)
CURL_VERSION_ALTSVC
(int)
CURL_VERSION_ASYNCHDNS
(int)
CURL_VERSION_BROTLI
(int)
CURL_VERSION_CONV
(int)
CURL_VERSION_CURLDEBUG
(int)
CURL_VERSION_DEBUG
(int)
CURL_VERSION_GSASL
(int)
CURL_VERSION_GSSAPI
(int)
CURL_VERSION_GSSNEGOTIATE
(int)
CURL_VERSION_HSTS
(int)
CURL_VERSION_IDN
(int)
CURL_VERSION_MULTI_SSL
(int)
CURL_VERSION_NTLM
(int)
CURL_VERSION_NTLM_WB
(int)
CURL_VERSION_IPV6
(int)
CURL_VERSION_KERBEROS4
(int)
CURL_VERSION_KERBEROS5
(int)
CURL_VERSION_HTTP2
(int)
CURL_VERSION_HTTP3
(int)
CURL_VERSION_LARGEFILE
(int)
CURL_VERSION_PSL
(int)
CURL_VERSION_SPNEGO
(int)
CURL_VERSION_SSPI
(int)
CURL_VERSION_SSL
(int)
CURL_VERSION_TLSAUTH_SRP
(int)
CURL_VERSION_UNICODE
(int)
CURL_VERSION_UNIX_SOCKETS
(int)
CURL_VERSION_ZSTD
(int)
CURL_VERSION_LIBZ
(int)
CURLVERSION_NOW
(int)
CURLFTPAUTH_DEFAULT
(int)
CURLFTPAUTH_SSL
(int)
CURLFTPAUTH_TLS
(int)
CURLPROXY_HTTP
(int)
CURLPROXY_HTTP_1_0
(int)
CURLPROXY_SOCKS4
(int)
CURLPROXY_SOCKS5
(int)
CURL_NETRC_OPTIONAL
(int)
CURL_NETRC_IGNORED
(int)
CURL_NETRC_REQUIRED
(int)
CURL_HTTP_VERSION_NONE
(int)
CURL_HTTP_VERSION_1_0
(int)
CURL_HTTP_VERSION_1_1
(int)
CURL_HTTP_VERSION_2
(int)
CURL_HTTP_VERSION_2_0
(int)
CURL_HTTP_VERSION_2TLS
(int)
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
(int)
CURLM_CALL_MULTI_PERFORM
(int)
CURLM_OK
(int)
CURLM_BAD_HANDLE
(int)
CURLM_BAD_EASY_HANDLE
(int)
CURLM_OUT_OF_MEMORY
(int)
CURLM_INTERNAL_ERROR
(int)
CURLMSG_DONE
(int)
CURLOPT_KEYPASSWD
(int)
CURLOPT_SSH_AUTH_TYPES
(int)
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
(int)
CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256
(int)
CURLOPT_SSH_HOSTKEYFUNCTION
(int)
CURLOPT_SSH_PRIVATE_KEYFILE
(int)
CURLOPT_SSH_PUBLIC_KEYFILE
(int)
CURLOPT_SSL_OPTIONS
(int)
CURLSSLOPT_ALLOW_BEAST
(int)
CURLSSLOPT_NO_REVOKE
(int)
CURLSSLOPT_AUTO_CLIENT_CERT
(int)
CURLSSLOPT_NATIVE_CA
(int)
CURLSSLOPT_NO_PARTIALCHAIN
(int)
CURLSSLOPT_REVOKE_BEST_EFFORT
(int)
CURLOPT_USERNAME
(int)
CURLOPT_SASL_AUTHZID
(int)
CURLOPT_SASL_IR
(int)
CURLOPT_DNS_INTERFACE
(int)
CURLOPT_DNS_LOCAL_IP4
(int)
CURLOPT_DNS_LOCAL_IP6
(int)
CURLOPT_XOAUTH2_BEARER
(int)
CURLOPT_LOGIN_OPTIONS
(int)
CURLOPT_EXPECT_100_TIMEOUT_MS
(int)
CURLOPT_SSL_ENABLE_ALPN
(int)
CURLOPT_SSL_ENABLE_NPN
(int)
CURLOPT_PINNEDPUBLICKEY
(int)
CURLOPT_UNIX_SOCKET_PATH
(int)
CURLOPT_SSL_VERIFYSTATUS
(int)
CURLOPT_PATH_AS_IS
(int)
CURLOPT_SSL_FALSESTART
(int)
CURLOPT_PIPEWAIT
(int)
CURLOPT_PROTOCOLS_STR
(int)
CURLOPT_PROXY_SERVICE_NAME
(int)
CURLOPT_SERVICE_NAME
(int)
CURLOPT_DEFAULT_PROTOCOL
(int)
CURLOPT_STREAM_WEIGHT
(int)
CURLOPT_TFTP_NO_OPTIONS
(int)
CURLOPT_CONNECT_TO
(int)
CURLOPT_TCP_FASTOPEN
(int)
CURLOPT_TCP_KEEPALIVE
(int)
CURLOPT_TCP_KEEPIDLE
(int)
CURLOPT_TCP_KEEPINTVL
(int)
CURLMOPT_PIPELINING
(int)
CURLMOPT_MAXCONNECTS
(int)
CURLMOPT_MAX_CONCURRENT_STREAMS
(int)
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
(int)
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
(int)
CURLMOPT_MAX_HOST_CONNECTIONS
(int)
CURLMOPT_MAX_PIPELINE_LENGTH
(int)
CURLMOPT_MAX_TOTAL_CONNECTIONS
(int)
CURLMOPT_PUSHFUNCTION
(int)
CURLSSH_AUTH_AGENT
(int)
CURLSSH_AUTH_ANY
(int)
CURLSSH_AUTH_DEFAULT
(int)
CURLSSH_AUTH_HOST
(int)
CURLSSH_AUTH_KEYBOARD
(int)
CURLSSH_AUTH_NONE
(int)
CURLSSH_AUTH_PASSWORD
(int)
CURLSSH_AUTH_PUBLICKEY
(int)
CURLPAUSE_ALL
(int)
CURLPAUSE_CONT
(int)
CURLPAUSE_RECV
(int)
CURLPAUSE_RECV_CONT
(int)
CURLPAUSE_SEND
(int)
CURLPAUSE_SEND_CONT
(int)
CURLPIPE_NOTHING
(int)
CURLPIPE_HTTP1
(int)
CURLPIPE_MULTIPLEX
(int)
CURLPROXY_SOCKS4A
(int)
CURLPROXY_SOCKS5_HOSTNAME
(int)
CURLHEADER_SEPARATE
(int)
CURLHEADER_UNIFIED
(int)
CURLPROTO_SMB
(int)
CURLPROTO_SMBS
(int)
CURLPROTO_MQTT
(int)
CURLOPT_REDIR_PROTOCOLS_STR
(int)
CURLOPT_REQUEST_TARGET
(int)
CURLAUTH_GSSAPI
(int)
CURL_MAX_READ_SIZE
(int)
CURLOPT_ABSTRACT_UNIX_SOCKET
(int)
CURLOPT_KEEP_SENDING_ON_ERROR
(int)
CURLOPT_PRE_PROXY
(int)
CURLOPT_PROXY_CAINFO
(int)
CURLOPT_PROXY_CAINFO_BLOB
(int)
CURLOPT_PROXY_CAPATH
(int)
CURLOPT_PROXY_CRLFILE
(int)
CURLOPT_PROXY_KEYPASSWD
(int)
CURLOPT_PROXY_PINNEDPUBLICKEY
(int)
CURLOPT_PROXY_SSLCERT
(int)
CURLOPT_PROXY_SSLCERTTYPE
(int)
CURLOPT_PROXY_SSL_CIPHER_LIST
(int)
CURLOPT_PROXY_SSLKEY
(int)
CURLOPT_PROXY_SSLKEYTYPE
(int)
CURLOPT_PROXY_SSL_OPTIONS
(int)
CURLOPT_PROXY_SSL_VERIFYHOST
(int)
CURLOPT_PROXY_SSL_VERIFYPEER
(int)
CURLOPT_PROXY_SSLVERSION
(int)
CURLOPT_PROXY_TLSAUTH_PASSWORD
(int)
CURLOPT_PROXY_TLSAUTH_TYPE
(int)
CURLOPT_PROXY_TLSAUTH_USERNAME
(int)
CURLOPT_SOCKS5_AUTH
(int)
CURLOPT_SUPPRESS_CONNECT_HEADERS
(int)
CURLPROXY_HTTPS
(int)
CURL_SSLVERSION_MAX_DEFAULT
(int)
CURL_SSLVERSION_MAX_NONE
(int)
CURL_SSLVERSION_MAX_TLSv1_0
(int)
CURL_SSLVERSION_MAX_TLSv1_1
(int)
CURL_SSLVERSION_MAX_TLSv1_2
(int)
CURL_SSLVERSION_MAX_TLSv1_3
(int)
CURL_SSLVERSION_TLSv1_3
(int)
CURL_VERSION_HTTPS_PROXY
(int)
CURLAUTH_BEARER
(int)
CURL_LOCK_DATA_CONNECT
(int)
CURL_LOCK_DATA_PSL
(int)
CURLOPT_DISALLOW_USERNAME_IN_URL
(int)
CURLOPT_DNS_SHUFFLE_ADDRESSES
(int)
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
(int)
CURLOPT_HAPROXYPROTOCOL
(int)
CURLOPT_PROXY_TLS13_CIPHERS
(int)
CURLOPT_SSH_COMPRESSION
(int)
CURLOPT_TIMEVALUE_LARGE
(int)
CURLOPT_TLS13_CIPHERS
(int)
CURLSSH_AUTH_GSSAPI
(int)
CURLOPT_HTTP09_ALLOWED
(int)
CURLMIMEOPT_FORMESCAPE
(int)
CURLWS_RAW_MODE
(int)
CURLKHMATCH_OK
(int)
CURLKHMATCH_MISMATCH
(int)
CURLKHMATCH_MISSING
(int)
CURLKHMATCH_LAST
(int)
常量 | 描述 |
---|---|
CURLINFO_APPCONNECT_TIME
(int)
|
从建立 SSL/SSH 连接/握手起,到与远程主机完成连接所花费的秒数 |
CURLINFO_APPCONNECT_TIME_T
(int)
|
从建立 SSL/SSH 连接/握手起,到与远程主机完成连接所花费的微秒数。自 PHP 7.3.0 和 cURL 7.61.0 起可用 |
CURLINFO_CAINFO
(int)
|
默认内置 CA 证书位置。自 PHP 8.3.0 和 cURL 7.84.0 起可用 |
CURLINFO_CAPATH
(int)
|
默认内置 CA 证书路径。自 PHP 8.3.0 和 cURL 7.84.0 起可用 |
CURLINFO_CERTINFO
(int)
|
TLS 证书链 |
CURLINFO_CONDITION_UNMET
(int)
|
不满足时间条件的信息 |
CURLINFO_CONNECT_TIME
(int)
|
建立连接所花费的秒数 |
CURLINFO_CONNECT_TIME_T
(int)
|
从开始到完成连接远程主机(或代理)所花费的总微秒数。自 PHP 7.3.0 和 cURL 7.61.0 起可用 |
CURLINFO_CONTENT_LENGTH_DOWNLOAD
(int)
|
从 "Content-Length:" 字段读取的下载内容长度 (单位:字节) |
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
(int)
|
下载的 content-length。该值从 "Content-Length:" 字段读取。如果无法得知大小,则为 -1。自 PHP 7.3.0 和 cURL 7.55.0 起可用 |
CURLINFO_CONTENT_LENGTH_UPLOAD
(int)
|
指定上传大小 |
CURLINFO_CONTENT_LENGTH_UPLOAD_T
(int)
|
指定上传大小。如果大小未知,则为 -1。自 PHP 7.3.0 和 cURL 7.55.0 起可用 |
CURLINFO_CONTENT_TYPE
(int)
|
已请求的文档的 Content-Type:。NULL 表示服务器未发送有效的 Content-Type: header。 |
CURLINFO_COOKIELIST
(int)
|
所以已知的 cookie |
CURLINFO_EFFECTIVE_URL
(int)
|
最后有效的 URL |
CURLINFO_FILETIME
(int)
|
启用 CURLOPT_FILETIME 时,检索文档的远程时间;如果返回 -1,则表示文档的时间未知。
|
CURLINFO_FILETIME_T
(int)
|
检索文档的远程时间 (Unix 时间戳),它是 CURLINFO_FILETIME 的替代方案,允许
32 位长整型的系统提取超出 32 位时间戳范围的日期。自 PHP 7.3.0 和 cURL 7.59.0 起可用
|
CURLINFO_FTP_ENTRY_PATH
(int)
|
FTP 服务器中的条目路径 |
CURLINFO_HEADER_OUT
(int)
|
已发送的请求字符串。如果要生效,需要调用 curl_setopt() 函数将 CURLINFO_HEADER_OUT 选项添加到句柄中
|
CURLINFO_HEADER_SIZE
(int)
|
所有检索到的 header 总大小 |
CURLINFO_HTTPAUTH_AVAIL
(int)
|
之前的响应中,用位掩码表示对应可用的身份验证方法 |
CURLINFO_HTTP_CODE
(int)
|
最后的响应码。自 cURL 7.10.8 起,这是 CURLINFO_RESPONSE_CODE 的遗留别名。
|
CURLINFO_HTTP_CONNECTCODE
(int)
|
CONNECT 响应码 |
CURLINFO_HTTP_VERSION
(int)
|
上次 HTTP 连接中使用的版本。返回值将是定义的 CURL_HTTP_VERSION_*
常量中的一个,或者如果无法确定版本,则返回 0。自 PHP 7.3.0 和 cURL 7.50.0 起可用
|
CURLINFO_LOCAL_IP
(int)
|
最近连接的本地 (源) IP 地址 |
CURLINFO_LOCAL_PORT
(int)
|
最近连接的本地 (源) 端口 |
CURLINFO_NAMELOOKUP_TIME
(int)
|
域名解析完成所需秒数 |
CURLINFO_NAMELOOKUP_TIME_T
(int)
|
域名解析完成所需的微秒数。自 PHP 7.3.0 和 cURL 7.61.0 起可用 |
CURLINFO_NUM_CONNECTS
(int)
|
为完成上次传输,cURL 创建的连接数 |
CURLINFO_OS_ERRNO
(int)
|
连接失败的错误码 (Errno)。该数字与操作系统和系统相关。 |
CURLINFO_PRETRANSFER_TIME
(int)
|
从开始到文件传输开始之前的秒数 |
CURLINFO_PRETRANSFER_TIME_T
(int)
|
从开始到文件传输即将开始为止所花费的微秒数。自 PHP 7.3.0 和 cURL 7.61.0 起可用 |
CURLINFO_PRIMARY_IP
(int)
|
最近连接的目标 IP 地址 |
CURLINFO_PRIMARY_PORT
(int)
|
最近连接的目标端口 |
CURLINFO_PRIVATE
(int)
|
与 CURL 句柄相关的私有数据,先前使用 curl_setopt() 的
CURLOPT_PRIVATE 选项设置
|
CURLINFO_PROTOCOL
(int)
|
上次 HTTP 连接使用的协议。返回值将是 CURLPROTO_*
值之一。自 PHP 7.3.0 和 cURL 7.52.0 起可用
|
CURLINFO_PROXYAUTH_AVAIL
(int)
|
之前的响应中,用位掩码表示对应可用的代理身份验证方法 |
CURLINFO_PROXY_ERROR
(int)
|
详细的 (SOCKS) 代理错误代码。当最近传输返回 CURLE_PROXY 错误时,该代码会提供更多信息。返回值将是
CURLPX_* 值之一。如果没有可用的响应代码,则错误代码将是
CURLPX_OK 。自 PHP 8.2.0 和 cURL 7.73.0 起可用
|
CURLINFO_PROXY_SSL_VERIFYRESULT
(int)
|
请求(使用 CURLOPT_PROXY_SSL_VERIFYPEER 选项)时,证书的验证结果。仅 HTTPS 代理有效。自 PHP 7.3.0 和 cURL 7.52.0 起可用
|
CURLINFO_REDIRECT_COUNT
(int)
|
启用 CURLOPT_FOLLOWLOCATION 时的重定向次数。
|
CURLINFO_REDIRECT_TIME
(int)
|
启用 CURLOPT_FOLLOWLOCATION 选项后,最终事务开始前所有重定向步骤花费的秒数。
|
CURLINFO_REDIRECT_TIME_T
(int)
|
最终事务开始前所有重定向步骤(包含域名解析、连接、传输前预处理、传输)花费的秒数。自 PHP 7.3.0 和 cURL 7.61.0 起可用 |
CURLINFO_REDIRECT_URL
(int)
|
With the CURLOPT_FOLLOWLOCATION option disabled: redirect URL found in the last transaction, that should be requested manually next. With the CURLOPT_FOLLOWLOCATION option enabled: this is empty. The redirect URL in this case is available in CURLINFO_EFFECTIVE_URL
|
CURLINFO_REFERER
(int)
|
The referrer header. Available as of PHP 8.2.0 and cURL 7.76.0 |
CURLINFO_REQUEST_SIZE
(int)
|
Total size of issued requests, currently only for HTTP requests |
CURLINFO_RESPONSE_CODE
(int)
|
The last response code. Available as of cURL 7.10.8 |
CURLINFO_RETRY_AFTER
(int)
|
The information from the Retry-After: header, or zero if there was no valid header. Available as of PHP 8.2.0 and cURL 7.66.0 |
CURLINFO_RTSP_CLIENT_CSEQ
(int)
|
Next RTSP client CSeq |
CURLINFO_RTSP_CSEQ_RECV
(int)
|
Recently received CSeq |
CURLINFO_RTSP_SERVER_CSEQ
(int)
|
Next RTSP server CSeq |
CURLINFO_RTSP_SESSION_ID
(int)
|
RTSP session ID |
CURLINFO_SCHEME
(int)
|
The URL scheme used for the most recent connection. Available as of PHP 7.3.0 and cURL 7.52.0 |
CURLINFO_SIZE_DOWNLOAD
(int)
|
Total number of bytes downloaded |
CURLINFO_SIZE_DOWNLOAD_T
(int)
|
Total number of bytes that were downloaded. The number is only for the latest transfer and will be reset again for each new transfer. Available as of PHP 7.3.0 and cURL 7.50.0 |
CURLINFO_SIZE_UPLOAD
(int)
|
Total number of bytes uploaded |
CURLINFO_SIZE_UPLOAD_T
(int)
|
Total number of bytes that were uploaded. Available as of PHP 7.3.0 and cURL 7.50.0 |
CURLINFO_SPEED_DOWNLOAD
(int)
|
Average download speed |
CURLINFO_SPEED_DOWNLOAD_T
(int)
|
The average download speed in bytes/second that curl measured for the complete download. Available as of PHP 7.3.0 and cURL 7.50.0 |
CURLINFO_SPEED_UPLOAD
(int)
|
Average upload speed |
CURLINFO_SPEED_UPLOAD_T
(int)
|
The average upload speed in bytes/second that curl measured for the complete upload. Available as of PHP 7.3.0 and cURL 7.50.0 |
CURLINFO_SSL_ENGINES
(int)
|
OpenSSL crypto-engines supported |
CURLINFO_SSL_VERIFYRESULT
(int)
|
Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER
|
CURLINFO_STARTTRANSFER_TIME
(int)
|
Time in seconds until the first byte is about to be transferred |
CURLINFO_STARTTRANSFER_TIME_T
(int)
|
Time, in microseconds, it took from the start until the first byte is received. Available as of PHP 7.3.0 and cURL 7.61.0 |
CURLINFO_TOTAL_TIME
(int)
|
Total transaction time in seconds for last transfer |
CURLINFO_TOTAL_TIME_T
(int)
|
Total time in microseconds for the previous transfer, including name resolving, TCP connect etc. Available as of PHP 7.3.0 and cURL 7.61.0 |
常量 | 描述 |
---|---|
CURLE_ABORTED_BY_CALLBACK
(int)
|
回调已中止。回调向 libcurl 返回“abort”。 |
CURLE_BAD_CALLING_ORDER
(int)
|
|
CURLE_BAD_CONTENT_ENCODING
(int)
|
无法识别传输编码。 |
CURLE_BAD_DOWNLOAD_RESUME
(int)
|
由于指定的偏移量超出了文件边界,因此无法恢复下载。 |
CURLE_BAD_FUNCTION_ARGUMENT
(int)
|
调用的函数带有错误的参数。 |
CURLE_BAD_PASSWORD_ENTERED
(int)
|
|
CURLE_COULDNT_CONNECT
(int)
|
无法连接到主机或代理。 |
CURLE_COULDNT_RESOLVE_HOST
(int)
|
无法解析主机。指定的远程主机无法解析。 |
CURLE_COULDNT_RESOLVE_PROXY
(int)
|
无法解析代理。无法解析给定的代理主机。 |
CURLE_FAILED_INIT
(int)
|
初始化代码失败。这可能是内部错误或程序,或者是资源问题,导致在初始化时无法完成一些基本操作。 |
CURLE_FILESIZE_EXCEEDED
(int)
|
超出最大文件大小。 |
CURLE_FILE_COULDNT_READ_FILE
(int)
|
无法打开 FILE:// 指定的文件。很可能是因为文件路径未识别现有文件或由于缺乏适当的文件权限。 |
CURLE_FTP_ACCESS_DENIED
(int)
|
|
CURLE_FTP_BAD_DOWNLOAD_RESUME
(int)
|
|
CURLE_FTP_CANT_GET_HOST
(int)
|
用于查找新连接的主机发生内部故障。 |
CURLE_FTP_CANT_RECONNECT
(int)
|
|
CURLE_FTP_COULDNT_GET_SIZE
(int)
|
|
CURLE_FTP_COULDNT_RETR_FILE
(int)
|
这要么是对“RETR”命令的意外回复,要么是零字节传输完成。 |
CURLE_FTP_COULDNT_SET_ASCII
(int)
|
|
CURLE_FTP_COULDNT_SET_BINARY
(int)
|
|
CURLE_FTP_COULDNT_STOR_FILE
(int)
|
|
CURLE_FTP_COULDNT_USE_REST
(int)
|
FTP REST 命令返回错误。如果服务器正常,这种情况绝不会发生。 |
CURLE_FTP_PARTIAL_FILE
(int)
|
|
CURLE_FTP_PORT_FAILED
(int)
|
FTP PORT 命令返回错误。这种情况大多发生在为 libcurl 指定的地址没有足够好。参阅 CURLOPT_FTPPORT 。
|
CURLE_FTP_QUOTE_ERROR
(int)
|
|
CURLE_FTP_SSL_FAILED
(int)
|
|
CURLE_FTP_USER_PASSWORD_INCORRECT
(int)
|
|
CURLE_FTP_WEIRD_227_FORMAT
(int)
|
FTP 服务器返回 227-line 作为对 PASV 命令的响应。如果 libcurl 无法解析该行,则会传回此返回代码。 |
CURLE_FTP_WEIRD_PASS_REPLY
(int)
|
将 FTP 密码发送到服务器后,libcurl 需要收到正确的回复。此错误代码表示返回了意外代码。 |
CURLE_FTP_WEIRD_PASV_REPLY
(int)
|
libcurl 无法从服务器获取合理的结果作为对 PASV 或 EPSV 命令的响应。服务器存在缺陷。 |
CURLE_FTP_WEIRD_SERVER_REPLY
(int)
|
服务器发送了 libcurl 无法解析的数据。自 cURL 7.51.0 起,此错误代码为 CURLE_WEIRD_SERVER_REPLY 。
|
CURLE_FTP_WEIRD_USER_REPLY
(int)
|
|
CURLE_FTP_WRITE_ERROR
(int)
|
|
CURLE_FUNCTION_NOT_FOUND
(int)
|
未找到函数。未找到所需的 zlib 函数。 |
CURLE_GOT_NOTHING
(int)
|
服务器没有返回任何内容,在这种情况下,没有得到任何内容视为错误。 |
CURLE_HTTP_NOT_FOUND
(int)
|
|
CURLE_HTTP_PORT_FAILED
(int)
|
|
CURLE_HTTP_POST_ERROR
(int)
|
这是一个奇怪的错误,主要由于内部混乱而发生。 |
CURLE_HTTP_RANGE_ERROR
(int)
|
|
CURLE_HTTP_RETURNED_ERROR
(int)
|
如果 CURLOPT_FAILONERROR 设置为 true 并且 HTTP 服务器返回大于或等于 400 的错误代码,则返回此值。
|
CURLE_LDAP_CANNOT_BIND
(int)
|
LDAP 无法绑定。LDAP 绑定操作失败。 |
CURLE_LDAP_INVALID_URL
(int)
|
|
CURLE_LDAP_SEARCH_FAILED
(int)
|
LDAP 搜索失败。 |
CURLE_LIBRARY_NOT_FOUND
(int)
|
|
CURLE_MALFORMAT_USER
(int)
|
|
CURLE_OBSOLETE
(int)
|
|
CURLE_OK
(int)
|
一切顺利。一切照常进行。 |
CURLE_OPERATION_TIMEDOUT
(int)
|
操作超时。根据条件已达到指定的超时时限。 |
CURLE_OPERATION_TIMEOUTED
(int)
|
|
CURLE_OUT_OF_MEMORY
(int)
|
内存分配请求失败。 |
CURLE_PARTIAL_FILE
(int)
|
文件传输的大小跟预期的不一致。当服务器首先报告预期的传输大小,然后提供与先前指定的大小不匹配的数据时,就会发生这种情况。 |
CURLE_PROXY
(int)
|
代理握手错误。CURLINFO_PROXY_ERROR 提供有关特定问题的额外详细信息。自 PHP 8.2.0 和 cURL 7.73.0 起可用
|
CURLE_READ_ERROR
(int)
|
读取本地文件时出现问题,或者读取回调返回错误。 |
CURLE_RECV_ERROR
(int)
|
接收网络数据失败。 |
CURLE_SEND_ERROR
(int)
|
发送网络数据失败。 |
CURLE_SHARE_IN_USE
(int)
|
|
CURLE_SSH
(int)
|
SSH 会话期间发生未指定的错误。自 cURL 7.16.1 起可用。 |
CURLE_SSL_CACERT
(int)
|
|
CURLE_SSL_CACERT_BADFILE
(int)
|
读取 SSL CA 证书时出现问题。 |
CURLE_SSL_CERTPROBLEM
(int)
|
本地客户端证书有问题。 |
CURLE_SSL_CIPHER
(int)
|
无法使用指定的密码。 |
CURLE_SSL_CONNECT_ERROR
(int)
|
SSL/TLS 握手中某处出现问题。读取错误缓冲区中的消息可提供有关该问题的更多详细信息。可能是证书(文件格式、路径、权限)、密码等。 |
CURLE_SSL_ENGINE_NOTFOUND
(int)
|
未找到指定的加密引擎。 |
CURLE_SSL_ENGINE_SETFAILED
(int)
|
无法将选定的 SSL 加密引擎设置为默认值。 |
CURLE_SSL_PEER_CERTIFICATE
(int)
|
|
CURLE_SSL_PINNEDPUBKEYNOTMATCH
(int)
|
Failed to match the pinned key specified with
CURLOPT_PINNEDPUBLICKEY .
|
CURLE_TELNET_OPTION_SYNTAX
(int)
|
|
CURLE_TOO_MANY_REDIRECTS
(int)
|
Too many redirects. When following redirects, libcurl hit the maximum amount.
The limit can be set with CURLOPT_MAXREDIRS .
|
CURLE_UNKNOWN_TELNET_OPTION
(int)
|
|
CURLE_UNSUPPORTED_PROTOCOL
(int)
|
The URL passed to libcurl used a protocol that libcurl does not support. The issue might be a compile-time option that was not used, a misspelled protocol string or just a protocol libcurl has no code for. |
CURLE_URL_MALFORMAT
(int)
|
The URL was not properly formatted. |
CURLE_URL_MALFORMAT_USER
(int)
|
|
CURLE_WEIRD_SERVER_REPLY
(int)
|
The server sent data libcurl could not parse.
This error code was known as CURLE_FTP_WEIRD_SERVER_REPLY
before cURL 7.51.0.
Available as of PHP 7.3.0 and cURL 7.51.0
|
CURLE_WRITE_ERROR
(int)
|
An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback. |