| 常量 | 描述 | 
  curl_setopt()
  
   | CURLOPT_ABSTRACT_UNIX_SOCKET(int) | 
     允许使用抽象 Unix 域套接字而不是与主机建立 TCP 连接,并将路径设置为指定 string。此选项与
     CURLOPT_UNIX_SOCKET_PATH具有相同的语义。这两个选项共享相同的存储,因此每个句柄只能设置其中一个。自
     PHP 7.3.0 和 cURL 7.53.0 起可用。 | 
  
   | CURLOPT_ACCEPT_ENCODING(int) | 
     设置 string,其中包含 HTTP 请求中发送的 Accept-Encoding:标头的内容。设置为null可禁用发送Accept-Encoding:标头。默认为null。自 cURL 7.21.6 起可用。 | 
  
   | CURLOPT_ACCEPTTIMEOUT_MS(int) | 
     使用活跃 FTP 连接时等待服务器连接回 cURL 的最大毫秒数。此选项接受任何可以转换为有效 int
     的值。默认为 60000毫秒。自 cURL 7.24.0 起可用。 | 
  
   | CURLOPT_ADDRESS_SCOPE(int) | 
     连接到 IPv6 地址时使用的范围 ID 值。此选项接受任何可以转换为有效 int
     的值。默认为 0。自 cURL 7.19.0 起可用。 | 
  
   | CURLOPT_ALTSVC(int) | 
     传递 string,其中包含 cURL 的文件名,用作 Alt-Svc 缓存文件,从中读取现有缓存内容,并可能在传输后将其写回,除非通过
     CURLOPT_ALTSVC_CTRL设置了CURLOPT_ALTSVC_CTRL。自 PHP 8.2.0 和 cURL 7.64.1 起可用。 | 
  
   | CURLOPT_ALTSVC_CTRL(int) | 
     使用正确的功能集填充位掩码,以指示 cURL 如何处理使用此句柄进行传输的 Alt-Svc。cURL 仅接受通过 HTTPS 传递的 Alt-Svc
     header,并且仅在替代源正确托管于 HTTPS 上时才会完成对该源的请求。设置任意位(bit)将启用 alt-svc 引擎。可设置为任意
     CURLALTSVC_*常量,Alt-Svc 处理默认为禁用。自
     PHP 8.2.0 和 cURL 7.64.1 起可用。 | 
  
   | CURLOPT_APPEND(int) | 
     将此选项设置为 1时,FTP 上传将会追加到远程文件,而不是覆盖。默认值为0。自 cURL 7.17.0 起可用。 | 
  
   | CURLOPT_AUTOREFERER(int) | 
     true时将根据Location:重定向时,自动设置 header 中的Referer:信息。默认是0。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_AWS_SIGV4(int) | 
     在 HTTP(S) header 提供 string 形式的 AWS V4 签名认证。此选项会覆盖 CURLOPT_HTTPAUTH中设置的其他认证类型。该方法不能与其他认证类型结合使用。自 PHP 8.2.0 和 cURL 7.75.0 起可用。 | 
  
   | CURLOPT_BINARYTRANSFER(int) | 
     该常量自 PHP 5.5.0 起不再使用。自 PHP 8.4.0 起弃用。
     | 
  
   | CURLOPT_BUFFERSIZE(int) | 
     每次读取要使用的缓冲区大小。但不能保证此请求一定会得到满足。此选项接受任何可以转换为有效 int
     的值。默认为 CURL_MAX_WRITE_SIZE(当前为 16kB)。自 cURL 7.10 起可用。 | 
  
   | CURLOPT_CAINFO(int) | 
     包含一个或多个证书的文件名称的 string,用于验证对等方。这仅在与
     CURLOPT_SSL_VERIFYPEER结合使用时才有意义。可能需要绝对路径。自
     cURL 7.4.2 起可用。 | 
  
   | CURLOPT_CAINFO_BLOB(int) | 
     string,包含用于验证对等方的一个或多个证书的 PEM 文件名。此选项会覆盖
     CURLOPT_CAINFO。自 PHP 8.2.0 和 cURL 7.77.0 起可用。 | 
  
   | CURLOPT_CAPATH(int) | 
     包含多个 CA 证书的目录 string。此选项需与 CURLOPT_SSL_VERIFYPEER一起使用。自 cURL 7.9.8 起可用。 | 
  
   | CURLOPT_CA_CACHE_TIMEOUT(int) | 
     设置内存中已缓存的 CA 证书存储可保留并重新用于新连接的最长时间(以秒为单位)。此选项接受任何可转换为有效
     int 的值。默认值为 86400(24 小时)。自 PHP 8.3.0 和 cURL 7.87.0 起可用 | 
  
   | CURLOPT_CERTINFO(int) | 
     true将在安全传输时输出 SSL 证书信息到STDERR。需要开启CURLOPT_VERBOSE才有效。默认为false。自 cURL 7.19.1 起可用。 | 
  
   | CURLOPT_CONNECTTIMEOUT(int) | 
     在尝试连接时等待的秒数。设置为 0,则无限等待。此选项接受任何可以转换为有效 int
     的值。默认 300。自 cURL 7.7.0 起可用。 | 
  
   | CURLOPT_CONNECTTIMEOUT_MS(int) | 
     尝试连接等待的时间,以毫秒为单位。设置为 0,则无限等待。如果 cURL
     编译时使用系统标准的名称解析器(standard system name
     resolver),那部分的连接仍旧使用以秒计的超时解决方案,最小超时时间还是一秒钟。此选项接受任何可以转换为有效 int
     的值。默认300000。自 cURL 7.16.2 起可用。 | 
  
   | CURLOPT_CONNECT_ONLY(int) | 
     true将让库执行所有需要的代理、验证、连接过程,但不传输数据。此选项用于
     HTTP、SMTP 和 POP3。默认是false。自 cURL 7.15.2 起可用。 | 
  
   | CURLOPT_CONNECT_TO(int) | 
     连接到指定主机和端口,从而替换 URL 中的主机和端口。接受 string 格式的
     array:HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT。自
     PHP 7.0.7 和 cURL 7.49.0 起可用。 | 
  
   | CURLOPT_COOKIE(int) | 
     包含 HTTP 请求中使用的 Cookie: header 内容的 string。请注意,多个 Cookie
     之间用分号分隔,后跟一个空格(例如,fruit=apple; colour=red)。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_COOKIEFILE(int) | 
     包含 cookie 数据的文件的名称 string。cookie 文件可以是 Netscape 格式,也可以只是转储到文件中的纯
     HTTP 样式标头。如果名称为空 string,则不会加载任何 cookie,但仍启用 cookie 处理。自 cURL 7.1.0 起可用。
     | 
  
   | CURLOPT_COOKIEJAR(int) | 
     string,包含调用句柄的析构函数时用于保存所有内部 cookie 的文件的名称。自 cURL 7.9.0 起可用。
      警告
      
       自 PHP 8.0.0 起,curl_close() 为空操作(什么都不做),不会销毁句柄。如果需要在句柄自动销毁之前写入
       cookie,使用 curl_setopt($ch, CURLOPT_COOKIELIST, "FLUSH");。 | 
  
   | CURLOPT_COOKIELIST(int) | 
     cookie string(即 Netscape/Mozilla 的单行格式,或常规 HTTP 样式的 Set-Cookie header)将单个
     cookie 添加到内部 cookie 存储中。
     
       ALL擦除内存中保存的所有 cookie
      ,SESS擦除内存中保存的所有会话 cookie
      ,FLUSH将所有已知的 cookie 写入到CURLOPT_COOKIEJAR指定的文件
      ,RELOAD从CURLOPT_COOKIEFILE指定的文件中加载所有 cookie
      .
     自 cURL 7.14.1 起可用。 | 
  
   | CURLOPT_COOKIESESSION(int) | 
     设为 true时将开启新的 cookie“会话”。将强制 cURL 忽略之前会话时存的其他 cookie。cURL
     在默认情况下无论是否为会话,都会储存、加载所有 cookie。会话 cookie
     是指没有过期时间,只存活在会话之中。自 cURL 7.9.7 起可用。 | 
  
   | CURLOPT_CRLF(int) | 
     true表示将 Unix 换行符转换成 CRLF 换行符。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_CRLFILE(int) | 
     传递 string,指定包含 CRL(证书吊销列表)(PEM 格式)的文件名,用于在 SSL
     交换期间进行证书验证。当 cURL 构建为使用 GnuTLS 时,无法影响传递的 CRL 在验证过程中的使用。当
     cURL 构建为支持 OpenSSL 时,会同时设置 X509_V_FLAG_CRL_CHECK和X509_V_FLAG_CRL_CHECK_ALL,要求在传递 CRL 文件时对证书链的所有元素进行
     CRL 检查。另请注意,由于 OpenSSL 的 bug,自 cURL 7.71.0 起,CURLOPT_CRLFILE隐含CURLSSLOPT_NO_PARTIALCHAIN。自 cURL 7.19.0 起可用。 | 
  
   | CURLOPT_CUSTOMREQUEST(int) | 
     HTTP 请求时,使用自定义的请求方法来代替 GET或HEAD。对DELETE或者其他更隐蔽的 HTTP 请求有用。有效值如GET、POST,CONNECT等等;也就是说,不要在这里输入整行 HTTP 请求。例如输入GET /index.html HTTP/1.0\r\n\r\n是不正确的。此选项接受 string 或null。自 cURL 7.1.0 起可用。 注意: 
       
       在没有首先确保服务器支持自定义请求方法的情况下,不要执行此操作。
      
 | 
  
   | CURLOPT_DEFAULT_PROTOCOL(int) | 
     URL 缺少协议的时候,使用 string 格式的默认协议。自 PHP 7.0.7 和 cURL 7.45.0 起可用。
     | 
  
   | CURLOPT_DIRLISTONLY(int) | 
     将此选项设置为 1时,其效果会因所使用的协议而异。基于 FTP 和 SFTP 的 URL
     将仅列出目录中的文件名。POP3 将列出 POP3 服务器上的电子邮件或邮件列表。对于 FILE
     协议,此选项无效,因为在此模式下会始终列出目录。将此选项与CURLOPT_WILDCARDMATCH一起使用时,后者将不会产生任何效果。默认值为0。自 cURL 7.17.0 起可用。 | 
  
   | CURLOPT_DISALLOW_USERNAME_IN_URL(int) | 
     设置为 true时,URL 中不允许包含 username。默认情况下允许 username。自 PHP 7.3.0 和 cURL 7.61.0 起可用。 | 
  
   | CURLOPT_DNS_CACHE_TIMEOUT(int) | 
     设置在内存中缓存 DNS 的时间,默认为 120秒(2 分钟)。此选项接受任何可以转换为有效
     int 的值。自 cURL 7.9.3 起可用。 | 
  
   | CURLOPT_DNS_INTERFACE(int) | 
     设置 DNS 解析器应绑定到的网络接口名称。该名称必须是接口名称(而非地址)。此选项接受
     string 或 null。自 PHP 7.0.7 和 cURL 7.33.0 起可用 | 
  
   | CURLOPT_DNS_LOCAL_IP4(int) | 
     设置解析器应绑定的本地 IPv4 地址。参数应包含单一的数值型 IPv4 地址。此选项接受
     string 或 null。自 PHP 7.0.7 和 cURL 7.33.0 起可用。 | 
  
   | CURLOPT_DNS_LOCAL_IP6(int) | 
     设置解析器应绑定的本地 IPv6 地址。参数应包含单一的数值型 IPv6 地址。此选项接受
     string 或 null。自 PHP 7.0.7 和 cURL 7.33.0 起可用。 | 
  
   | CURLOPT_DNS_SERVERS(int) | 
     传递包含以逗号分隔的 DNS 服务器列表的 string,用于替代系统默认值(例如
     192.168.1.100,192.168.1.101:8080)。自 cURL 7.24.0 起可用。 | 
  
   | CURLOPT_DNS_SHUFFLE_ADDRESSES(int) | 
     设置为 true时,将打乱所有返回地址的顺序,使得在解析名称并返回多个 IP 地址时,这些地址将以随机顺序使用。这可能导致
     IPv4 在 IPv6 之前被使用,或者反之。自 PHP 7.3.0 和 cURL 7.60.0 起可用。 | 
  
   | CURLOPT_DNS_USE_GLOBAL_CACHE(int) | 
     true表示使用全局 DNS 缓存。此选项非线程安全。如果 PHP 是为非线程使用(CLI、FCGI、Apache2-Prefork
     等)构建的,则默认情况下会有条件性的启用此选项。自 cURL 7.9.3 起可用,自 cURL 7.11.1 起弃用。自
     PHP 8.4 起,此选项不再有效。 | 
  
   | CURLOPT_DOH_SSL_VERIFYHOST(int) | 
     设置为 2时,将针对主机名验证 DNS-over-HTTPS 服务器的 SSL 证书名称字段。自 PHP 8.2.0 和 cURL 7.76.0 起可用。 | 
  
   | CURLOPT_DOH_SSL_VERIFYPEER(int) | 
     设置为 1以启用,设置为0以禁用对 DNS-over-HTTPS
     服务器 SSL 证书真实性的验证。自 PHP 8.2.0 和 cURL 7.76.0 起可用。 | 
  
   | CURLOPT_DOH_SSL_VERIFYSTATUS(int) | 
     设置为 1以启用,设置为0以禁用通过“Certificate Status
     Request”TLS 扩展(OCSP 快速验证)对 DNS-over-HTTPS 服务器证书状态的验证。自 PHP 8.2.0 和 cURL 7.76.0 起可用。 | 
  
   | CURLOPT_DOH_URL(int) | 
     提供 DNS-over-HTTPS 的 URL。此选项接受 string 或 null。自 PHP 8.1.0 和 cURL 7.62.0 起可用。 | 
  
   | CURLOPT_EGDSOCKET(int) | 
     类似于 CURLOPT_RANDOM_FILE,但指定的是熵收集守护进程(Entropy Gathering
     Daemon)套接字的文件名。自 cURL 7.7.0 起可用,并自 cURL 7.84.0 起弃用。 | 
  
   | CURLOPT_ENCODING(int) | 
     Accept-Encoding: header 的内容,以 string
     形式表示。启用响应的解码功能。支持的编码类型包括:identity,deflate,gzip。如果设置为空 string,则会发送包含所有支持的编码类型的
     header。自 cURL 7.10 起可用,并自 cURL 7.21.6 起被弃用。 | 
  
   | CURLOPT_EXPECT_100_TIMEOUT_MS(int) | 
     Expect: 100-continue响应的超时时间,以毫秒为单位。默认为1000毫秒。此选项接受任何可以转换为有效 int 的值。自 PHP 7.0.7 和 cURL 7.36.0 起可用。 | 
  
   | CURLOPT_FAILONERROR(int) | 
     当 HTTP 状态码大于等于 400,true将显示错误详情。默认情况下将返回页面,忽略
     HTTP 代码。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_FILE(int) | 
     接受文件句柄 resource,用于指定传输内容应写入的文件。默认值为
     STDOUT(浏览器窗口)。自 cURL 7.1.0 起可用,并自 cURL 7.9.7 起被弃用。 | 
  
   | CURLOPT_FILETIME(int) | 
     设置为 true时,会尝试获取远程文档中的修改时间信息。此值可通过 curl_getinfo()
     函数的CURLINFO_FILETIME选项获取。自 cURL 7.5.0 起可用。 | 
  
   | CURLOPT_FNMATCH_FUNCTION(int) | 
     传递用于通配符匹配的 callable。回调函数的签名应为:
      
      
       如果模式匹配 string,回调函数应返回curlHandle
        
         cURL 句柄。
        
       pattern
        
         通配符模式。
        
       string
        
         用于运行通配符模式匹配的 string。
        
        CURL_FNMATCHFUNC_MATCH;如果不匹配,返回CURL_FNMATCHFUNC_NOMATCH;如果发生错误,返回CURL_FNMATCHFUNC_FAIL。自 cURL 7.21.0 起可用。 | 
  
   | CURLOPT_FOLLOWLOCATION(int) | 
     设置为 true时将会根据服务器返回 HTTP header 中的Location: 重定向。参CURLOPT_MAXREDIRS。当 open_basedir 启用时,此常量无效。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_FORBID_REUSE(int) | 
     设置为 true后,在完成交互以后强制断开连接,不能在连接池中重用。自 cURL 7.7.0 起可用。 | 
  
   | CURLOPT_FRESH_CONNECT(int) | 
     设置为 true强制获取新连接,而不是缓存中的连接。自 cURL 7.7.0 起可用。 | 
  
   | CURLOPT_FTPAPPEND(int) | 
     设置为 true时为追加写入文件,而不是覆盖。自 cURL 7.1.0 起可用并于 cURL 7.16.4 起弃用。 | 
  
   | CURLOPT_FTPASCII(int) | 
     CURLOPT_TRANSFERTEXT的别名。请改用CURLOPT_TRANSFERTEXT。自
     cURL 7.1 起可用,自 cURL 7.11.1 起弃用,最后在 cURL 7.15.5 中可用。自 PHP 7.3.0 起移除。 | 
  
   | CURLOPT_FTPLISTONLY(int) | 
     设置为 true时只列出 FTP 目录的名称。自 cURL 7.1.0 起可用并于 cURL 7.16.4 起弃用。 | 
  
   | CURLOPT_FTPPORT(int) | 
     用于获取 FTP PORT指令所使用的 IP 地址的 string。PORT指令会告知远程服务器连接到指定 IP 地址。该 string 可以是纯 IP 地址、主机名、网络接口名称(在
     Unix 系统下),或者仅为一个短横线-,以使用系统的默认 IP 地址。此选项接受 string
     或null。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_FTPSSLAUTH(int) | 
     将 FTP over SSL 身份验证方法(如果已启用)设置为任何 CURLFTPAUTH_*常量。默认CURLFTPAUTH_DEFAULT。自 cURL 7.12.2 起可用。 | 
  
   | CURLOPT_FTP_ACCOUNT(int) | 
     传递 string,将通过 FTP(使用 ACCT命令)在提供用户名和密码后作为账户信息发送到服务器。设置为null可禁用发送账户信息。默认值为null。自 cURL 7.13.0 起可用。 | 
  
   | CURLOPT_FTP_ALTERNATIVE_TO_USER(int) | 
     传递 string,将在 USER/PASS协商失败时用于尝试通过
     FTP 进行身份验证。自 cURL 7.15.5 起可用。 | 
  
   | CURLOPT_FTP_CREATE_MISSING_DIRS(int) | 
     设置为 true时在 FTP 操作遇到当前不存在的路径时会创建缺失的目录。自 cURL 7.10.7 起可用。 | 
  
   | CURLOPT_FTP_FILEMETHOD(int) | 
     告知 cURL 使用哪种方法访问 FTP(S) 服务器上的文件。可能的值为任一 CURLFTPMETHOD_*常量。默认值为CURLFTPMETHOD_MULTICWD。自 cURL 7.15.1 起可用。 | 
  
   | CURLOPT_FTP_RESPONSE_TIMEOUT(int) | 
     cURL 等待 FTP 服务器响应的超时时间,以秒为单位。此选项会覆盖 CURLOPT_TIMEOUT。该选项接受任何可转换为有效
     int 的值。自 PHP 8.4.0 起,已替换此选项为CURLOPT_SERVER_RESPONSE_TIMEOUT。自
     cURL 7.10.8 起可用,并自 cURL 7.85.0 起被弃用。 | 
  
   | CURLOPT_FTP_SKIP_PASV_IP(int) | 
     如果此选项设置为 1,cURL 将不会使用服务器在 cURLPASV命令时于 227 响应中建议的 IP
     地址,而是使用其用于连接的 IP 地址。cURL 不会忽略从 227 响应中接收到的端口号。自 cURL 7.74.0 起默认值为1,之前版本默认值为0。自 cURL 7.15.0 起可用。 | 
  
   | CURLOPT_FTP_SSL(int) | 
     自 cURL 7.11.0 起可用,并自 cURL 7.16.4 起弃用。
     | 
  
   | CURLOPT_FTP_SSL_CCC(int) | 
     此选项使 cURL 使用 CCC(Clear Command Channel),在认证完成后关闭 SSL/TLS 层,从而使控制通道的其余通信变为未加密。使用
     CURLFTPSSL_CCC_*常量中的一个。默认值为CURLFTPSSL_CCC_NONE。自 cURL 7.16.1 起可用。 | 
  
   | CURLOPT_FTP_USE_EPRT(int) | 
     设置为 true时,当 FTP 下载时,使用EPRT(和LPRT)命令。设置为false时禁用EPRT和LPRT,仅仅使用PORT命令。自
     cURL 7.10.5 起可用。 | 
  
   | CURLOPT_FTP_USE_EPSV(int) | 
     设置为 true时,在 FTP 传输过程中,回到PASV模式前,先尝试EPSV命令。设置为false时禁用EPSV。自 cURL 7.9.2 起可用。 | 
  
   | CURLOPT_FTP_USE_PRET(int) | 
     设置为 1时,在PASV(和EPSV)之前发送PRET命令。在使用主动 FTP 传输模式时无效。默认值为0。自 cURL 7.20.0 起可用。 | 
  
   | CURLOPT_GSSAPI_DELEGATION(int) | 
     设置为 CURLGSSAPI_DELEGATION_FLAG以允许无条件的 GSSAPI 凭证委派。设置为CURLGSSAPI_DELEGATION_POLICY_FLAG时,仅在服务票据中设置了OK-AS-DELEGATEflag 时才进行委派。默认值为CURLGSSAPI_DELEGATION_NONE。自 cURL 7.22.0 起可用。 | 
  
   | CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(int) | 
     为“快乐眼球”算法设置 IPv6 的起始优先时间。“快乐眼球”算法会尝试同时连接双栈主机的 IPv4 和 IPv6 地址,优先选择
     IPv6,持续时间为指定的超时毫秒数。默认值为 CURL_HET_DEFAULT,当前为 200
     毫秒。此选项接受任何可转换为有效整数的值。自 PHP 7.3.0 和 cURL 7.59.0 起可用 | 
  
   | CURLOPT_HAPROXYPROTOCOL(int) | 
     设置为 true时,在连接开始时发送 HAProxyPROXY协议 v1 header。默认行为是不发送此头部。自
     PHP 7.3.0 和 cURL 7.60.0 起可用。 | 
  
   
   | 
     设置为 true以将 header 包含在发送到CURLOPT_WRITEFUNCTION定义的回调的输出中。自 cURL 7.1.0 起可用。 | 
  
   
   | 
     A callable with the following signature:
      
      
       The callback should return the number of bytes written.
     Available as of cURL 7.7.2.curlHandle
        
         The cURL handle.
        
       headerData
        
         The header data which must be written by the callback.
        
        | 
  
   
   | 
     将 HTTP header 同时发送到代理和主机或单独发送。可能的值是 CURLHEADER_*常量。自 cURL 7.42.1 起默认CURLHEADER_SEPARATE,在此之前默认为CURLHEADER_UNIFIED。自 PHP 7.0.7 和 cURL 7.37.0 起可用。 | 
  
   | CURLOPT_HSTS(int) | 
     string with HSTS (HTTP Strict Transport Security) cache file name
     or nullto allow HSTS without reading from or writing to any file
     and clear the list of files to read HSTS data from.
     Available as of PHP 8.2.0 and cURL 7.74.0. | 
  
   | CURLOPT_HSTS_CTRL(int) | 
     Accepts a bitmask of HSTS (HTTP Strict Transport Security) features
     defined by the CURLHSTS_*constants.
     Available as of PHP 8.2.0 and cURL 7.74.0. | 
  
   | CURLOPT_HTTP09_ALLOWED(int) | 
     是否允许 HTTP/0.9 响应。从 cURL 7.66.0 起默认为 false;以前默认为true。分别自
     PHP 7.3.15 和 7.4.3 以及 cURL 7.64.0 起可用。 | 
  
   | CURLOPT_HTTP200ALIASES(int) | 
     An array of HTTP 200responses that will be treated as valid responses and not as errors.
     Available as of cURL 7.10.3. | 
  
   | CURLOPT_HTTPAUTH(int) | 
     使用的 HTTP 验证方法。选项有:
     CURLAUTH_BASIC,CURLAUTH_DIGEST,CURLAUTH_GSSNEGOTIATE,CURLAUTH_NTLM,CURLAUTH_AWS_SIGV4,CURLAUTH_ANY,CURLAUTH_ANYSAFE。如果使用多种方法,cURL 将轮询服务器以查看它支持哪些方法并选择最佳方法。CURLAUTH_ANY设置所有的位。cURL 将自动选择它认为最安全的一个。CURLAUTH_ANYSAFE设置了除CURLAUTH_BASIC以外所有的位。cURL 将自动选择它认为最安全的一个。自 cURL 7.10.6 起可用。 | 
  
   | CURLOPT_HTTPGET(int) | 
     设置为 true时会设置 HTTP 方法为GET,由于默认是GET,所以只有修改请求方法时才需要这个选项。自 cURL 7.8.1 起可用。 | 
  
   
   | 
     An array of HTTP header fields to set, in the format
     
      array('Content-type: text/plain', 'Content-length: 100')
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_HTTPPROXYTUNNEL(int) | 
     true会通过指定 HTTP 代理来传输。自 cURL 7.3.0 起可用。 | 
  
   | CURLOPT_HTTP_CONTENT_DECODING(int) | 
     false时获取原始 HTTP 响应主体。自 cURL 7.16.2 起可用。 | 
  
   | CURLOPT_HTTP_TRANSFER_DECODING(int) | 
     If set to 0, transfer decoding is disabled.
     If set to1, transfer decoding is enabled.
     cURL does chunked transfer decoding by default
     unless this option is set to0.
     Defaults to1.
     Available as of cURL 7.16.2. | 
  
   | CURLOPT_HTTP_VERSION(int) | 
     设置为 CURL_HTTP_VERSION_*常量中的一个,以便
     cURL 使用指定的 HTTP 版本。自 cURL 7.9.1 起可用。 | 
  
   | CURLOPT_IGNORE_CONTENT_LENGTH(int) | 
     If set to 1,
     ignore theContent-Lengthheader in the HTTP response
     and ignore asking for or relying on it for FTP transfers.
     Defaults to0.
     Available as of cURL 7.14.1. | 
  
   | CURLOPT_INFILE(int) | 
     Accepts a file handle resource
     to the file that the transfer should be read from when uploading.
     Available as of cURL 7.1.0 and deprecated as of cURL 7.9.7.
     Use CURLOPT_READDATAinstead. | 
  
   | CURLOPT_INFILESIZE(int) | 
     希望传给远程站点的文件字节大小。注意无法用这个选项阻止 cURL 发送更多的数据,确切发送什么取决于
     CURLOPT_READFUNCTION。此选项接受任何可以转换为有效 int
     的值。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_INTERFACE(int) | 
     Set to a string with the name of the outgoing network interface to use.
     This can be an interface name, an IP address or a host name.
     Available as of cURL 7.1.0.
     | 
  
   | CURLOPT_IPRESOLVE(int) | 
     允许应用程序选择在解析主机名时使用哪种 IP 地址。这仅在使用解析使用多个 IP 版本的地址的主机名时才有意义。设置为
     CURL_IPRESOLVE_*常量中的一个。默认为CURL_IPRESOLVE_WHATEVER。自 cURL 7.10.8 起可用。 | 
  
   | CURLOPT_ISSUERCERT(int) | 
     If set to a string naming a file holding a CA certificate in PEM format,
     an additional check against the peer certificate is performed
     to verify the issuer is indeed the one associated
     with the certificate provided by the option.
     For the result of the check to be considered a failure,
     this option should be used in combination with the
     CURLOPT_SSL_VERIFYPEERoption.
     Available as of cURL 7.19.0. | 
  
   | CURLOPT_ISSUERCERT_BLOB(int) | 
     Pass a string with binary data of a CA SSL certificate in PEM format.
     If set, an additional check against the peer certificate is performed
     to verify the issuer is the one associated with the certificate provided by the option.
     Available as of PHP 8.1.0 and cURL 7.71.0.
     | 
  
   | CURLOPT_KEEP_SENDING_ON_ERROR(int) | 
     设置为 true时,如果返回的 HTTP 代码等于或大于300,则继续发送请求主体。默认操作是停止发送并关闭流或连接。适用于手动 NTLM
     身份验证。大多数应用程序不需要此选项。自 PHP 7.3.0 和 cURL 7.51.0 起可用。 | 
  
   | CURLOPT_KEYPASSWD(int) | 
     Set to a string with the password required to use the CURLOPT_SSLKEYorCURLOPT_SSH_PRIVATE_KEYFILEprivate key.
     Setting this option tonulldisables using a password for these options.
     Available as of cURL 7.17.0. | 
  
   | CURLOPT_KRB4LEVEL(int) | 
     The KRB4 (Kerberos 4) security level. Any of the following string values
     (in order from least to most powerful) are valid:
     clear,safe,confidential,private.
     If the string does not match one of these,privateis used. Setting this option tonullwill disable KRB4 security. Currently KRB4 security only works
     with FTP transactions.
     Available as of cURL 7.3.0 and deprecated as of cURL 7.17.0. | 
  
   | CURLOPT_KRBLEVEL(int) | 
     Set the kerberos security level for FTP and also enables kerberos awareness.
     This should be set to one of the following strings:
     clear,safe,confidential,private.
     If the string is set but does not match one of these,privateis used.
     Setting this option tonullwill disable kerberos support for FTP.
     Defaults tonull.
     Available as of cURL 7.16.4. | 
  
   | CURLOPT_LOCALPORT(int) | 
     Sets the local port number of the socket used for the connection.
     This option accepts any value that can be cast to a valid int.
     Defaults to 0.
     Available as of cURL 7.15.2. | 
  
   | CURLOPT_LOCALPORTRANGE(int) | 
     The number of attempts cURL makes to find a working local port number,
     starting with the one set with CURLOPT_LOCALPORT.
     This option accepts any value that can be cast to a valid int.
     Defaults to1.
     Available as of cURL 7.15.2. | 
  
   | CURLOPT_LOGIN_OPTIONS(int) | 
     Can be used to set protocol specific login options, such as the
     preferred authentication mechanism via AUTH=NTLMorAUTH=*, and should be used in conjunction with theCURLOPT_USERNAMEoption.
     Available as of PHP 7.0.7 and cURL 7.34.0. | 
  
   | CURLOPT_LOW_SPEED_LIMIT(int) | 
     传输速度,每秒字节数,根据 CURLOPT_LOW_SPEED_TIME秒数统计是否因太慢而取消传输。此选项接受任何可以转换为有效 int
     的值。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_LOW_SPEED_TIME(int) | 
     当传输速度小于 CURLOPT_LOW_SPEED_LIMIT时(bytes/sec),PHP
     会判断是否因太慢而取消传输。此选项接受任何可以转换为有效 int
     的值。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_MAIL_AUTH(int) | 
     Set a string with the authentication address (identity)
     of a submitted message that is being relayed to another server.
     The address should not be specified within a pair of angled brackets
     (><).
     If an empty string is used then a pair of brackets are sent by cURL
     as required by RFC 2554.
     Available as of cURL 7.25.0. | 
  
   | CURLOPT_MAIL_FROM(int) | 
     Set a string with the sender's email address when sending SMTP mail.
     The email address should be specified with angled brackets
     (><) around it,
     which if not specified are added automatically.
     If this parameter is not specified then an empty address is sent
     to the SMTP server which might cause the email to be rejected.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_MAIL_RCPT(int) | 
     Set to an array of strings
     with the recipients to pass to the server in an SMTP mail request.
     Each recipient should be specified within a pair of angled brackets
     (><).
     If an angled bracket is not used as the first character,
     cURL assumes a single email address has been provided
     and encloses that address within brackets.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_MAIL_RCPT_ALLLOWFAILS(int) | 
     设置为 1以允许RCPT TO命令对某些收件人失败,这会使 cURL
     忽略个别收件人的错误并继续处理其余已接受的收件人。如果所有收件人触发失败并且设置了此 flag,cURL 将中止
     SMTP 对话并返回从最后一个RCPT TO命令收到的错误。自 cURL 8.2.0 起由CURLOPT_MAIL_RCPT_ALLOWFAILS取代。自 PHP 8.2.0 和 cURL 7.69.0
     起可用。自 cURL 8.2.0 起弃用。 | 
  
   | CURLOPT_MAXAGE_CONN(int) | 
     重新使用已存在连接时允许的最大空闲时间。默认最大时间设置为 118秒。此选项接受任何可以转换为有效 int 的值。自 PHP 8.2.0 和 cURL 7.65.0 起可用。 | 
  
   | CURLOPT_MAXCONNECTS(int) | 
     允许的最大持久连接数。当达到限制时,将会关闭缓存中最早的连接,以防止增加已打开的连接数。此选项接受任何可以转换为有效
     int 的值。自 cURL 7.7.0 起可用。
     | 
  
   | CURLOPT_MAXFILESIZE(int) | 
     Sets the maximum accepted size (in bytes) of a file to download.
     If the file requested is found larger than this value,
     the transfer is aborted
     and CURLE_FILESIZE_EXCEEDEDis returned.
     Passing0disables this option,
     and passing a negative size returns aCURLE_BAD_FUNCTION_ARGUMENT.
     If the file size is not known prior to the start of download,
     this option has no effect.
     For setting a size limit above2GB,CURLOPT_MAXFILESIZE_LARGEshould be used.
     As of cURL 8.4.0, this option also stops ongoing transfers
     if they reach this threshold.
     This option accepts any value that can be cast to a valid int.
     Defaults to0.
     Available as of cURL 7.10.8. | 
  
   | CURLOPT_MAXFILESIZE_LARGE(int) | 
     The maximum file size in bytes allowed to download. If the file requested is found larger than this value,
     the transfer will not start and CURLE_FILESIZE_EXCEEDEDwill be returned.
     The file size is not always known prior to download, and for such files this option has no effect even if
     the file transfer ends up being larger than this given limit.
     This option accepts any value that can be cast to a valid int.
     Available as of PHP 8.2.0 and cURL 7.11.0. | 
  
   | CURLOPT_MAXLIFETIME_CONN(int) | 
     The maximum time in seconds, since the creation of the connection, that is allowed for an existing
     connection to have for it to be considered for reuse. If a connection is found in the cache that is older
     than this value, it will instead be closed once any in-progress transfers are complete.
     Default is 0seconds, meaning the option is disabled and all connections are eligible for reuse.
     This option accepts any value that can be cast to a valid int.
     Available as of PHP 8.2.0 and cURL 7.80.0. | 
  
   | CURLOPT_MAXREDIRS(int) | 
     指定最多的 HTTP 重定向次数,这个选项是和 CURLOPT_FOLLOWLOCATION一起使用的。默认值20是为了防止无限重定向。设置为-1允许无限重定向,0拒绝所有重定向。自 cURL 7.5.0 起可用。 | 
  
   | CURLOPT_MAX_RECV_SPEED_LARGE(int) | 
     如果下载速度超过了此速度(以每秒字节数来统计),即传输过程中累计的平均数,传输就会降速到这个参数的值。默认不限速。
     This option accepts any value that can be cast to a valid int.
     Available as of cURL 7.15.5.
     | 
  
   | CURLOPT_MAX_SEND_SPEED_LARGE(int) | 
     如果上传的速度超过了此速度(以每秒字节数来统计),即传输过程中累计的平均数,传输就会降速到这个参数的值。默认不限速。
     This option accepts any value that can be cast to a valid int.
     Available as of cURL 7.15.5.
     | 
  
   | CURLOPT_MIME_OPTIONS(int) | 
     Set to a bitmask of CURLMIMEOPT_*constants. Currently there is only one available option:CURLMIMEOPT_FORMESCAPE.
     Available as of PHP 8.3.0 and cURL 7.81.0. | 
  
   | CURLOPT_MUTE(int) | 
     设置 true时将完全静默,无论是何 cURL 函数。使用CURLOPT_RETURNTRANSFER代替。自 cURL 7.1.0 起可用,自 cURL 7.8.0 起弃用,最后在 cURL 7.15.5 中可用。自 PHP 7.3.0 起移除。 | 
  
   | CURLOPT_NETRC(int) | 
     设置为 true时,在连接建立时,访问 ~/.netrc
     文件获取用户名和密码来连接远程站点。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_NETRC_FILE(int) | 
     Set a string containing the full path name to a .netrcfile.
     If this option is omitted andCURLOPT_NETRCis set,
     cURL checks for a.netrcfile
     in the current user's home directory.
     Available as of cURL 7.11.0. | 
  
   | CURLOPT_NEW_DIRECTORY_PERMS(int) | 
     Sets the value of the permissions (int) that is set on newly created directories
     on the remote server. The default value is 0755.
     The only protocols that can use this aresftp://,scp://andfile://.
     Available as of cURL 7.16.4. | 
  
   | CURLOPT_NEW_FILE_PERMS(int) | 
     Sets the value of the permissions (as an int) that are set on newly created files
     on the remote server. The default value is 0644.
     The only protocols that can use this aresftp://,scp://andfile://.
     Available as of cURL 7.16.4. | 
  
   | CURLOPT_NOBODY(int) | 
     设置为 true可从输出中排除正文。对于 HTTP(S),cURL 会发出 HEAD 请求。对于大多数其他协议,cURL
     根本不会要求正文数据。将其更改为false将导致正文数据包含在输出中。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_NOPROGRESS(int) | 
     设置为 true时关闭 cURL 的传输进度。 自 cURL 7.1.0 起可用。注意: 
       
       PHP 自动设置此选项为 true,只有用于调试才需要改变设置。
 | 
  
   | CURLOPT_NOPROXY(int) | 
     Set a string consisting of a comma separated list of hostnames
     that do not require a proxy to get reached.
     Each name in this list is matched as either a domain
     which contains the hostname or the hostname itself.
     The only wildcard available in the string
     is a single *character which matches all hosts,
     effectively disabling the proxy.
     Setting this option to an empty string enables the proxy for all hostnames.
     Since cURL 7.86.0, IP addresses set with this option
     can be provided using CIDR notation.
     Available as of cURL 7.19.4. | 
  
   | CURLOPT_NOSIGNAL(int) | 
     true时忽略所有的 cURL 函数传递给 PHP 进程的信号。在 SAPI
     多线程传输时默认启用此选项,所以超时选项仍能使用。自 cURL 7.10 起可用。 | 
  
   | CURLOPT_PASSWDFUNCTION(int) | 
     A callable with the following signature:
      
      
       The callback should return a string containing the password.
     Available as of cURL 7.4.2, deprecated as of cURL 7.11.1
     and last available in cURL 7.15.5.
     Removed as of PHP 7.3.0.curlHandle
        
         The cURL handle.
        
       passwordPrompt
        
         A password prompt.
        
       maximumPasswordLength
        
         The maximum length of the password.
        
        | 
  
   | CURLOPT_PASSWORD(int) | 
     Set to a string with the password to use in authentication.
     Available as of cURL 7.19.1.
     | 
  
   | CURLOPT_PATH_AS_IS(int) | 
     Set to truefor cURL not alter URL paths before passing them on to the server.
     Defaults tofalse, which squashes sequences of/../or/./that may exist in the URL's path part
     which is supposed to be removed according to RFC 3986 section 5.2.4.
     Available as of PHP 7.0.7 and cURL 7.42.0. | 
  
   | CURLOPT_PINNEDPUBLICKEY(int) | 
     Set a string with the pinned public key.
     The string can be the file name of the pinned public key
     in a PEM or DER file format. The string can also be any
     number of base64 encoded sha256 hashes preceded by sha256//and
     separated by;.
     Available as of PHP 7.0.7 and cURL 7.39.0. | 
  
   | CURLOPT_PIPEWAIT(int) | 
     Set to trueto wait for an existing connection to confirm
     whether it can do multiplexing and use it if it can
     before creating and using a new connection.
     Available as of PHP 7.0.7 and cURL 7.43.0. | 
  
   | CURLOPT_PORT(int) | 
     An int with an alternative port number to connect to
     instead of the one specified in the URL or the default port for the used protocol.
     Available as of cURL 7.1.0.
     | 
  
   | CURLOPT_POST(int) | 
     设置为 true用于执行 HTTPPOST请求。此请求使用application/x-www-form-urlencodedheader。默认为false。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_POSTFIELDS(int) | 
     The full data to post in a HTTP POSToperation.
     This parameter can either be
     passed as a urlencoded string like 'para1=val1¶2=val2&...'
     or as an array with the field name as key and field data as value.
     Ifvalueis an array, theContent-Typeheader will be set tomultipart/form-data.
     Files can be sent using CURLFile or CURLStringFile,
     in which casevaluemust be an array.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_POSTQUOTE(int) | 
     An array of FTP command strings
     to execute on the server after the FTP request has been performed.
     Available as of cURL 7.1.0.
     | 
  
   | CURLOPT_POSTREDIR(int) | 
     位掩码,CURL_REDIR_POST_301、CURL_REDIR_POST_302和CURL_REDIR_POST_303。当设置CURLOPT_FOLLOWLOCATION并发生了特定类型的重定向时,是否需要再次 HTTPPOST到重定向网址。自 cURL 7.19.1 起可用。 | 
  
   | CURLOPT_PRE_PROXY(int) | 
     Set a string holding the host name or dotted numerical
     IP address to be used as the preproxy that cURL connects to before
     it connects to the HTTP(S) proxy specified in the
     CURLOPT_PROXYoption for the upcoming request.
     The preproxy can only be a SOCKS proxy and it should be prefixed with[scheme]://to specify which kind of socks is used.
     A numerical IPv6 address must be written within [brackets].
     Setting the preproxy to an empty string explicitly disables the use of a preproxy.
     To specify port number in this string, append:[port]to the end of the host name. The proxy's port number may optionally be
     specified with the separate optionCURLOPT_PROXYPORT.
     Defaults to using port 1080 for proxies if a port is not specified.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PREQUOTE(int) | 
     Set an array of FTP command strings to pass to the server
     after the transfer type is set.
     These commands are not performed when a directory listing is performed,
     only for file transfers.
     Available as of cURL 7.9.5.
     | 
  
   | CURLOPT_PRIVATE(int) | 
     Any data that should be associated with this cURL handle. This data
     can subsequently be retrieved with the
     CURLINFO_PRIVATEoption of
     curl_getinfo(). cURL does nothing with this data.
     When using a cURL multi handle, this private data is typically a
     unique key to identify a standard cURL handle.
     Available as of cURL 7.10.3. | 
  
   | CURLOPT_PROGRESSFUNCTION(int) | 
     A callable with the following signature:
      
      callback(    resource $curlHandle,    int $bytesToDownload,    int $bytesDownloaded,    int $bytesToUpload,    int $bytesUploaded): int 
      
       The callback should return an int with a non-zero value to abort the transfer
     and set acurlHandle
        
         The cURL handle.
        
       bytesToDownload
        
         The total number of bytes expected to be downloaded in this transfer.
        
       bytesDownloaded
        
         The number of bytes downloaded so far.
        
       bytesToUpload
        
         The total number of bytes expected to be uploaded in this transfer.
        
       bytesUploaded
        
         The number of bytes uploaded so far.
        
        CURLE_ABORTED_BY_CALLBACKerror.Available as of cURL 7.1.0 and deprecated as of cURL 7.32.0.
     Use注意: 
       
       The callback is only called when the CURLOPT_NOPROGRESSoption is set tofalse.
 CURLOPT_XFERINFOFUNCTIONinstead. | 
  
   | CURLOPT_PROTOCOLS(int) | 
     Bitmask of CURLPROTO_*values.
     If used, this bitmask limits what protocols cURL may use in the transfer.
     Defaults toCURLPROTO_ALL, ie. cURL will accept all protocols it supports.
     See alsoCURLOPT_REDIR_PROTOCOLS.
     Available as of cURL 7.19.4 and deprecated as of cURL 7.85.0. | 
  
   | CURLOPT_PROTOCOLS_STR(int) | 
     Set to a string with a comma separated list
     of case insensitive protocol names (URL schemes) to allow in the transfer.
     Set to ALLto enable all protocols.
     By default, cURL accepts all protocols it was built with support for.
     Available protocols are:DICT,FILE,FTP,FTPS,GOPHER,GOPHERS,HTTP,HTTPS,IMAP,IMAPS,LDAP,LDAPS,MQTT,POP3,POP3S,RTMP,RTMPE,RTMPS,RTMPT,RTMPTE,RTMPTS,RTSP,SCP,SFTP,SMB,SMBS,SMTP,SMTPS,TELNET,TFTP,WS,WSS.
     Available as of PHP 8.3.0 and cURL 7.85.0. | 
  
   | CURLOPT_PROXY(int) | 
     A string with the HTTP proxy to tunnel requests through.
     This should be the hostname, the dotted numerical IP address
     or a numerical IPv6 address written within [brackets].
     Available as of cURL 7.1.0.
     | 
  
   | CURLOPT_PROXYAUTH(int) | 
     A bitmask of the HTTP authentication method(s)
     (CURLAUTH_*constants)
     to use for the proxy connection.
     For proxy authentication, onlyCURLAUTH_BASICandCURLAUTH_NTLMare currently supported.
     Defaults toCURLAUTH_BASIC.
     Available as of cURL 7.10.7. | 
  
   
   | 
     An array of custom HTTP header strings to pass to proxies.
     Available as of PHP 7.0.7 and cURL 7.37.0.
     | 
  
   | CURLOPT_PROXYPASSWORD(int) | 
     Set a string with the password to be used for authentication with the proxy.
     Available as of cURL 7.19.1.
     | 
  
   | CURLOPT_PROXYPORT(int) | 
     An int with the port number of the proxy to connect to.
     This port number can also be set in CURLOPT_PROXY.
     Setting this to zero makes cURL use the default proxy port number
     or the port number specified in the proxy URL string.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_PROXYTYPE(int) | 
     Sets the type of the proxy to one of the
     CURLPROXY_*constants.
     Defaults toCURLPROXY_HTTP.
     Available as of cURL 7.10. | 
  
   | CURLOPT_PROXYUSERNAME(int) | 
     Set a string with the username to be used for authentication with the proxy.
     Available as of cURL 7.19.1.
     | 
  
   | CURLOPT_PROXYUSERPWD(int) | 
     A string with a username and password formatted as
     [username]:[password]to use for the
     connection to the proxy.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_PROXY_CAINFO(int) | 
     The path to proxy Certificate Authority (CA) bundle. Set the path as a
     string naming a file holding one or more certificates to
     verify the HTTPS proxy with.
     This option is for connecting to an HTTPS proxy, not an HTTPS server.
     Defaults set to the system path where cURL's cacert bundle is assumed
     to be stored.
     Available as of PHP 7.3.0 and cURL 7.52.0.
     | 
  
   | CURLOPT_PROXY_CAINFO_BLOB(int) | 
     A string with the name of a PEM file holding one or more certificates to verify the HTTPS proxy with.
     This option is for connecting to an HTTPS proxy, not an HTTPS server.
     Defaults set to the system path where cURL's cacert bundle is assumed
     to be stored.
     Available as of PHP 8.2.0 and cURL 7.77.0.
     | 
  
   | CURLOPT_PROXY_CAPATH(int) | 
     A string with the directory holding multiple CA certificates
     to verify the HTTPS proxy with.
     Available as of PHP 7.3.0 and cURL 7.52.0.
     | 
  
   | CURLOPT_PROXY_CRLFILE(int) | 
     Set to a string with the file name
     with the concatenation of CRL (Certificate Revocation List)
     in PEM format to use in the certificate validation that occurs during
     the SSL exchange.
     Available as of PHP 7.3.0 and cURL 7.52.0.
     | 
  
   | CURLOPT_PROXY_ISSUERCERT(int) | 
     Proxy issuer SSL certificate filename string.
     Available as of PHP 8.1.0 and cURL 7.71.0.
     | 
  
   | CURLOPT_PROXY_ISSUERCERT_BLOB(int) | 
     A string with the proxy issuer SSL certificate.
     Available as of PHP 8.1.0 and cURL 7.71.0.
     | 
  
   | CURLOPT_PROXY_KEYPASSWD(int) | 
     Set the string be used as the password required to use the
     CURLOPT_PROXY_SSLKEYprivate key.
     A passphrase is not needed to load a certificate
     but one is needed to load a private key.
     This option is for connecting to an HTTPS proxy, not an HTTPS server.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_PINNEDPUBLICKEY(int) | 
     Set the pinned public key for HTTPS proxy.
     The string can be the file name of the pinned public key
     which is expected to be in a PEMorDERfile format.
     The string can also be any number of base64 encoded sha256 hashes
     preceded bysha256//and separated by;.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SERVICE_NAME(int) | 
     A string with the proxy authentication service name.
     Available as of PHP 7.0.7, cURL 7.43.0 (for HTTP proxies) and cURL 7.49.0 (for SOCKS5 proxies).
     | 
  
   | CURLOPT_PROXY_SSLCERT(int) | 
     A string with the file name of the client certificate used to connect to the HTTPS proxy.
     The default format is P12on Secure Transport andPEMon other engines,
     and can be changed withCURLOPT_PROXY_SSLCERTTYPE.
     With NSS or Secure Transport, this can also be the nickname of the certificate
     used for authentication as it is named in the security database.
     If a file from the current directory is to be used,
     it must be prefixed with./in order to avoid confusion with a nickname.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSLCERTTYPE(int) | 
     A string with the format of the client certificate used when connecting to an HTTPS proxy.
     Supported formats are PEMandDER, except with Secure Transport.
     OpenSSL (versions 0.9.3 and later) and Secure Transport
     (on iOS 5 or later, or OS X 10.7 or later) also supportP12for
     PKCS#12-encoded files. Defaults toPEM.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSLCERT_BLOB(int) | 
     A string with the SSL proxy client certificate.
     Available as of PHP 8.1.0 and cURL 7.71.0.
     | 
  
   | CURLOPT_PROXY_SSLKEY(int) | 
     A string with the file name of the private key
     used for connecting to the HTTPS proxy.
     The default format is PEMand can be changed withCURLOPT_PROXY_SSLKEYTYPE.
     (iOS and Mac OS X only) This option is ignored if cURL was built against
     Secure Transport. Available if built with TLS enabled.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSLKEYTYPE(int) | 
     A string with the format of the private key.
     Supported formats are:
     PEM,DER,ENG.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSLKEY_BLOB(int) | 
     A string with the private key for connecting to the HTTPS proxy.
     Available as of PHP 8.1.0 and cURL 7.71.0.
     | 
  
   | CURLOPT_PROXY_SSLVERSION(int) | 
     Set the preferred HTTPS proxy TLS version to one of the
     Available as of PHP 7.3.0 and cURL 7.52.0.CURL_SSLVERSION_*constants.
     Defaults toCURL_SSLVERSION_DEFAULT. | 
  
   | CURLOPT_PROXY_SSL_CIPHER_LIST(int) | 
     A string with a colon-separated list of ciphers
     to use for the connection to the HTTPS proxy.
     When used with OpenSSL commas and spaces are also acceptable as separators,
     and !,-and+can be used as operators.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSL_OPTIONS(int) | 
     Set proxy SSL behavior options, which is a bitmask of the
     CURLSSLOPT_*constants.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_SSL_VERIFYHOST(int) | 
     设置为 2以根据代理名称验证 HTTPS 代理的证书名称字段。设置为0时,无论证书中使用的名称如何,连接都会成功。谨慎使用该能力!在 cURL 7.28.0 及更早版本中将其设置为1作为调试选项。在 cURL 7.28.1 到 7.65.3 中设置为1,则返回CURLE_BAD_FUNCTION_ARGUMENT。自 cURL 7.66.0 起,视1和2为相同的值。默认为2。在生产环境中,此选项的值应保持为2。从 PHP 7.3.0 和 cURL 7.52.0 开始可用。 | 
  
   | CURLOPT_PROXY_SSL_VERIFYPEER(int) | 
     false时阻止 CURL 验证对等证书(peer's certificate)。可以使用CURLOPT_CAINFO选项指定要验证的备用证书,或者使用CURLOPT_CAPATH选项指定证书目录。设置为false时,无论如何验证对等证书都会成功。默认为true。自 PHP 7.3.0 和 cURL 7.52.0 起可用。 | 
  
   | CURLOPT_PROXY_TLS13_CIPHERS(int) | 
     A string with a colon-separated list of ciphers to use for the connection to the TLS 1.3 connection to a proxy.
     This option is currently used only when cURL is built to use OpenSSL 1.1.1 or later.
     When using a different SSL backend the TLS 1.3 cipher suites can be set
     with the CURLOPT_PROXY_SSL_CIPHER_LISToption.
     Available as of PHP 7.3.0 and cURL 7.61.0. | 
  
   | CURLOPT_PROXY_TLSAUTH_PASSWORD(int) | 
     A string with the password to use for the TLS authentication method specified with the
     CURLOPT_PROXY_TLSAUTH_TYPEoption. Requires that theCURLOPT_PROXY_TLSAUTH_USERNAMEoption to also be set.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_TLSAUTH_TYPE(int) | 
     The method of the TLS authentication used for the HTTPS connection.
     Supported method is SRP. Available as of PHP 7.3.0 and cURL 7.52.0.注意: 
       
       Secure Remote Password (SRP) authentication for TLS provides mutual authentication
       if both sides have a shared secret. To use TLS-SRP, the
       CURLOPT_PROXY_TLSAUTH_USERNAMEandCURLOPT_PROXY_TLSAUTH_PASSWORDoptions must also be set.
 | 
  
   | CURLOPT_PROXY_TLSAUTH_USERNAME(int) | 
     The username to use for the HTTPS proxy TLS authentication method specified with the
     CURLOPT_PROXY_TLSAUTH_TYPEoption. Requires that theCURLOPT_PROXY_TLSAUTH_PASSWORDoption to also be set.
     Available as of PHP 7.3.0 and cURL 7.52.0. | 
  
   | CURLOPT_PROXY_TRANSFER_MODE(int) | 
     Set to 1to set the transfer mode (binary or ASCII)
     for FTP transfers done via an HTTP proxy, by appendingtype=aortype=ito the URL.
     Without this setting or it being set to0,CURLOPT_TRANSFERTEXThas no effect
     when doing FTP via a proxy.
     Defaults to0.
     Available as of cURL 7.18.0. | 
  
   | CURLOPT_PUT(int) | 
     true时允许 HTTP 发送文件。要被 PUT 的文件必须在CURLOPT_READDATA和CURLOPT_INFILESIZE中设置。自 cURL 7.1.0 起可用并于 cURL 7.12.1
     弃用。 | 
  
   | CURLOPT_QUICK_EXIT(int) | 
     Set to truefor cURL to skip cleanup of resources
     when recovering from a timeout.
     This allows for a swift termination of the cURL process
     at the expense of a possible leak of associated resources.
     Available as of PHP 8.3.0 and cURL 7.87.0. | 
  
   | CURLOPT_QUOTE(int) | 
     An array of FTP command strings to execute on the server prior to the FTP request.
     Available as of cURL 7.1.0.
     | 
  
   | CURLOPT_RANDOM_FILE(int) | 
     A string with a filename to be used to seed the random number generator for SSL.
     Available as of cURL 7.7.0 and deprecated as of cURL 7.84.0.
     | 
  
   | CURLOPT_RANGE(int) | 
     A string with the range(s) of data to retrieve in the format X-Ywhere X or Y are optional. HTTP transfers
     also support several intervals, separated with commas in the formatX-Y,N-M.
     Set tonullto disable requesting a byte range.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_READDATA(int) | 
     Sets a file pointer resource that will be used by the file read function
     set with CURLOPT_READFUNCTION.
     Available as of cURL 7.9.7. | 
  
   | CURLOPT_READFUNCTION(int) | 
     A callable with the following signature:
      
      
       The callback should return a string
     with a length equal or smaller than the amount of data requested,
     typically by reading it from the passed stream resource. It should
     return an empty string to signalcurlHandle
        
         The cURL handle.
        
       streamResource
        
         Stream resource provided to cURL through the option
     CURLOPT_READDATA.maxAmountOfDataToRead
        
         The maximum amount of data to be read.
        
        EOF.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_REDIR_PROTOCOLS(int) | 
     Bitmask of CURLPROTO_*values
     which limit what protocols cURL may use in a transfer that it follows to in
     a redirect whenCURLOPT_FOLLOWLOCATIONis enabled.
     This allows limiting specific transfers to only be allowed to use a subset
     of protocols in redirections.
     As of cURL 7.19.4, by default cURL will allow all protocols
     except forFILEandSCP.
     Prior to cURL 7.19.4, cURL would unconditionally follow to all supported protocols.
     See alsoCURLOPT_PROTOCOLSfor protocol constant values.
     Available as of cURL 7.19.4 and deprecated as of cURL 7.85.0. | 
  
   | CURLOPT_REDIR_PROTOCOLS_STR(int) | 
     Set to a string with a comma separated list
     of case insensitive protocol names (URL schemes)
     to allow to follow to in a redirect when
     CURLOPT_FOLLOWLOCATIONis enabled.
     Set toALLto enable all protocols.
     As of cURL 7.65.2 it defaults toFTP,FTPS,HTTPandHTTPS.
     From cURL 7.40.0 to 7.65.1, this defaults to all protocols exceptFILE,SCP,SMBandSMBS.
     Prior to cURL 7.40.0, this defaults to all protocols exceptFILEandSCP.
     Available protocols are:DICT,FILE,FTP,FTPS,GOPHER,GOPHERS,HTTP,HTTPS,IMAP,IMAPS,LDAP,LDAPS,MQTT,POP3,POP3S,RTMP,RTMPE,RTMPS,RTMPT,RTMPTE,RTMPTS,RTSP,SCP,SFTP,SMB,SMBS,SMTP,SMTPS,TELNET,TFTP,WS,WSS.
     Available as of PHP 8.3.0 and cURL 7.85.0. | 
  
   | CURLOPT_REFERER(int) | 
     A string with the contents of the Referer: header to be used in a HTTP request.
     Available as of cURL 7.1.0. | 
  
   | CURLOPT_REQUEST_TARGET(int) | 
     A string to use in the upcoming request
     instead of the path as extracted from the URL.
     Available as of PHP 7.3.0 and cURL 7.55.0.
     | 
  
   | CURLOPT_RESOLVE(int) | 
     Provide an array of colon-separated strings
     with custom addresses for specific host and port pairs in the following format:
     
      array(
        "example.com:80:127.0.0.1",
        "example2.com:443:127.0.0.2",
      )
     Available as of cURL 7.21.3. | 
  
   | CURLOPT_RESUME_FROM(int) | 
     恢复传输时,传递字节为单位的偏移量(以字节为单位)。此选项接受任何可以转换为有效 int
     的值。自 cURL 7.1.0 起可用。
     | 
  
   | CURLOPT_RETURNTRANSFER(int) | 
     true将 curl_exec() 获取的信息以 string 返回,而不是直接输出。 | 
  
   | CURLOPT_RTSP_CLIENT_CSEQ(int) | 
     Set an int with the CSEQ number to issue for the next RTSP request.
     Useful if the application is resuming a previously broken connection.
     The CSEQ increments from this new number henceforth.
     Defaults to 0.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_RTSP_REQUEST(int) | 
     Sets the kind of RTSP request to make.
     Must be one of the CURL_RTSPREQ_*constants.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_RTSP_SERVER_CSEQ(int) | 
     Set an int with the CSEQ number to expect
     for the next RTSP Server to Client request.
     This feature (listening for Server requests) is unimplemented.
     Defaults to 0.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_RTSP_SESSION_ID(int) | 
     Set a string with the value of the current RTSP Session ID for the handle.
     Once this value is set to any non-nullvalue,
     cURL returnsCURLE_RTSP_SESSION_ERRORif the ID received from the server does not match.
     If set tonull, cURL automatically sets the ID
     the first time the server sets it in a response.
     Defaults tonullAvailable as of cURL 7.20.0. | 
  
   | CURLOPT_RTSP_STREAM_URI(int) | 
     Sets a string with the stream URI to operate on.
     If not set, cURL defaults to operating on generic server options
     by passing *in the place of the RTSP Stream URI.
     When working with RTSP,CURLOPT_RTSP_STREAM_URIindicates what URL to send to the server in the request header
     while theCURLOPT_URLindicates
     where to make the connection to.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_RTSP_TRANSPORT(int) | 
     Set the Transport:header for this RTSP session.
     Available as of cURL 7.20.0. | 
  
   | CURLOPT_SAFE_UPLOAD(int) | 
     始终为 true,在CURLOPT_POSTFIELDS中禁用了对上传文件的@前缀的支持,这意味着以@开头的值可以作为字段安全地传递。上传可使用 CURLFile 替代。 | 
  
   | CURLOPT_SASL_AUTHZID(int) | 
     The authorization identity (authzid) string for the transfer. Only applicable to the PLAIN SASL
     authentication mechanism where it is optional. When not specified, only the authentication identity
     (authcid) as specified by the username will be sent to the server, along with the password.
     The server will derive the authzid from the authcid when not provided, which it will then use internally.
     Available as of PHP 8.2.0 and cURL 7.66.0.
     | 
  
   | CURLOPT_SASL_IR(int) | 
     true时开启,收到首包(first packet)后发送初始的响应(initial response)。自 PHP 7.0.7 和 cURL 7.31.0 起可用。 | 
  
   | CURLOPT_SERVICE_NAME(int) | 
     A string with the authentication service name.
     Available as of PHP 7.0.7 and cURL 7.43.0.
     | 
  
   | CURLOPT_SHARE(int) | 
     curl_share_init() 的结果。使 cURL 可以使用共享句柄中的数据。自 cURL 7.10 起可用。
     | 
  
   | CURLOPT_SOCKS5_AUTH(int) | 
     用于 SOCKS5 验证方法。选项是:
     CURLAUTH_BASIC,CURLAUTH_GSSAPI,CURLAUTH_NONE。当设置了多种方法时,cURL 将轮询服务器以查看其支持哪些方法并选择最佳方法。默认为CURLAUTH_BASIC|CURLAUTH_GSSAPI。使用CURLOPT_PROXYUSERPWD选项设置真实的用户名和密码。自 PHP 7.3.0 和 cURL 7.55.0 起可用。 | 
  
   | CURLOPT_SOCKS5_GSSAPI_NEC(int) | 
     Set to 1to enable and0to disable
     the unprotected exchange of the protection mode negotiation
     as part of the GSSAPI negotiation.
     Available as of cURL 7.19.4. | 
  
   | CURLOPT_SOCKS5_GSSAPI_SERVICE(int) | 
     Set a string holding the name of the SOCKS5 service.
     Defaults to rcmd.
     Available as of cURL 7.19.4 and deprecated as of cURL 7.49.0.
     UseCURLOPT_PROXY_SERVICE_NAMEinstead. | 
  
   | CURLOPT_SSH_AUTH_TYPES(int) | 
     A bitmask consisting of one or more of the following constants:
     CURLSSH_AUTH_PUBLICKEY,CURLSSH_AUTH_PASSWORD,CURLSSH_AUTH_HOST,CURLSSH_AUTH_KEYBOARD,CURLSSH_AUTH_AGENT,CURLSSH_AUTH_ANY.
     Defaults toCURLSSH_AUTH_ANY.
     Available as of cURL 7.16.1. | 
  
   | CURLOPT_SSH_COMPRESSION(int) | 
     trueto enable,falseto disable built-in SSH compression.
     Note that the server can disregard this request.
     Defaults tofalse.
     Available as of PHP 7.3.0 and cURL 7.56.0. | 
  
   | CURLOPT_SSH_HOSTKEYFUNCTION(int) | 
     A callable that will be called when SSH host key verification is needed.
     The callback must have the following signature:
      
      
       This callback overridescurlHandle
        
         The cURL handle.
        
       keyType
        
         One of the CURLKHTYPE_*key types.key
        
         The key to check.
        
       keyLength
        
         The length of the key in bytes.
        
        CURLOPT_SSH_KNOWNHOSTS.
     Available as of PHP 8.3.0 and cURL 7.84.0. | 
  
   | CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(int) | 
     A string containing 32 hexadecimal digits which should contain the
     MD5 checksum of the remote host's public key, and cURL will reject
     the connection to the host unless the md5sums match.
     This option is only for SCP and SFTP transfers.
     Available as of cURL 7.17.1.
     | 
  
   | CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256(int) | 
     A string with the base64-encoded SHA256 hash
     of the remote host's public key.
     The transfer will fail if the given hash does not match the hash the remote host provides.
     Available as of PHP 8.2.0 and cURL 7.80.0.
     | 
  
   | CURLOPT_SSH_KNOWNHOSTS(int) | 
     设置为要使用的 known_host 文件的文件名,该文件应使用 libssh2 支持的 OpenSSH 文件格式。自 cURL 7.19.6 起可用。
     | 
  
   | CURLOPT_SSH_PRIVATE_KEYFILE(int) | 
     私钥的文件名。如果未指定,cURL 会默认使用 $HOME/.ssh/id_dsa(如果设置了 HOME
     环境变量的话),或者在 HOME 未设置的情况下,默认使用当前目录下的 id_dsa文件。如果文件受密码保护,则需要使用CURLOPT_KEYPASSWD设置密码,自 cURL 7.16.1 起可用。 | 
  
   | CURLOPT_SSH_PUBLIC_KEYFILE(int) | 
     公钥的文件名。如果未指定,cURL 会默认使用 $HOME/.ssh/id_dsa.pub(如果设置了 HOME
     环境变量的话),或者在 HOME 未设置的情况下,默认使用当前目录下的 id_dsa.pub文件。自 cURL 7.16.1 起可用。 | 
  
   | CURLOPT_SSLCERT(int) | 
     包含 PEM 格式证书的文件名称。自 cURL 7.1.0 起可用。
     | 
  
   | CURLOPT_SSLCERTPASSWD(int) | 
     使用 CURLOPT_SSLCERT证书所需的密码。自 cURL 7.1.0 起可用,自 cURL 7.17.0 起已弃用。 | 
  
   | CURLOPT_SSLCERTTYPE(int) | 
     string 的证书格式。支持的格式有:
     PEM,DER,ENG,P12。P12(用于 PKCS#12 编码文件)自 OpenSSL 0.9.3
     起可用。默认PEM。自 cURL 7.9.3 起可用。 | 
  
   | CURLOPT_SSLCERT_BLOB(int) | 
     包含 SSL 客户端证书的 string。自 PHP 8.1.0 和 cURL 7.71.0 起可用。
     | 
  
   | CURLOPT_SSLENGINE(int) | 
     CURLOPT_SSLKEY中指定私有 SSL 密钥的加密引擎的 string
     标识符。自 cURL 7.9.3 起可用。 | 
  
   | CURLOPT_SSLENGINE_DEFAULT(int) | 
     加密引擎的 string 标识符,用于非对称加密操作。自 cURL 7.9.3 起可用。
     | 
  
   | CURLOPT_SSLKEY(int) | 
     包含私有 SSL 密钥的文件名。自 cURL 7.9.3 起可用。
     | 
  
   | CURLOPT_SSLKEYPASSWD(int) | 
     使用 CURLOPT_SSLKEY中指定私有 SSL 密钥所需的秘密密码。 自 cURL 7.9.3 起可用并且自 cURL 7.17.0 起弃用。注意: 
       
       由于此选项包含敏感密码,请确保妥善保管包含该选项的 PHP 脚本。
      
 | 
  
   | CURLOPT_SSLKEYTYPE(int) | 
     CURLOPT_SSLKEY中指定私有 SSL 密钥的秘钥类型。支持的密钥类型有:PEM,DER,ENG。默认为PEM。自 cURL 7.9.3 起可用。 | 
  
   | CURLOPT_SSLKEY_BLOB(int) | 
     客户端证书的 string 私钥。自 PHP 8.1.0 和 cURL 7.71.0 起可用。
     | 
  
   | CURLOPT_SSLVERSION(int) | 
     默认为CURL_SSLVERSION_*常量之一。 CURL_SSLVERSION_DEFAULT。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_SSL_CIPHER_LIST(int) | 
     用于 TLS 1.2(1.1、1.0)连接的以冒号分隔的密码 string。自 cURL 7.9 起可用。
     | 
  
   | CURLOPT_SSL_EC_CURVES(int) | 
     椭圆曲线算法的冒号分隔列表。例如,X25519:P-521是两个椭圆曲线的有效列表。此选项定义
     SSL 握手中的客户端密钥交换算法(如果 SSL 后端 cURL 编译为支持该算法)。自 PHP 8.2.0 和 cURL 7.73.0 起可用。 | 
  
   | CURLOPT_SSL_ENABLE_ALPN(int) | 
     false时禁用 SSL 握手中的 ALPN(如果 SSL 后端的
     cURL 内建支持)用于协商到 http2。自 PHP 7.0.7 和 cURL 7.36.0 起可用。 | 
  
   | CURLOPT_SSL_ENABLE_NPN(int) | 
     false时禁用 SSL 握手中的 NPN(如果 SSL 后端的 libcurl 内建支持),用于协商到
     http2。自 PHP 7.0.7 和 cURL 7.36.0 起可用,并且自 cURL 7.86.0 起弃用。 | 
  
   | CURLOPT_SSL_FALSESTART(int) | 
     true表示启用,false表示禁用 TLS 错误启动,这是 TLS 客户端在验证服务器Finished消息之前开始发送应用程序数据的模式。自 PHP 7.0.7 和 cURL 7.42.0 起可用。 | 
  
   | CURLOPT_SSL_OPTIONS(int) | 
     设置 SSL 行为选项,是 CURLSSLOPT_*常量的位掩码。默认未设置任何位。自 PHP 7.0.7 和 cURL 7.25.0 起可用。 | 
  
   | CURLOPT_SSL_SESSIONID_CACHE(int) | 
     设置为 0以禁用,设置为1以启用 SSL 会话
     ID 缓存。默认情况下,所有传输均启用缓存。自 cURL 7.16.0 起可用。 | 
  
   | CURLOPT_SSL_VERIFYHOST(int) | 
     2时验证 SSL 对等证书中的公用名称字段或主题备用名称(Subject Alternate Name,简称
     SNA)字段是否与提供的主机名匹配。0时不检查名称。不应使用1。在生产环境中,此选项的值应保持为2(默认值)。自 cURL 7.8.1 起可用。 | 
  
   | CURLOPT_SSL_VERIFYPEER(int) | 
     false时禁止 cURL 验证对等证书(peer's certificate)。要验证的交换证书可以在CURLOPT_CAINFO选项中设置,或在CURLOPT_CAPATH中设置证书目录。自 cURL 7.10 起默认为true。自 cURL 7.10
     起安装默认的 CA 证书包。自 cURL 7.4.2 起可用。 | 
  
   | CURLOPT_SSL_VERIFYSTATUS(int) | 
     true时启用或者false时禁用验证证书状态。自 PHP 7.0.7 和 cURL 7.41.0 起可用。 | 
  
   | CURLOPT_STDERR(int) | 
     接受指向替代位置的文件句柄 resource,以将错误输出到 STDERR以外的其他位置。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_STREAM_WEIGHT(int) | 
     设置 stream weight 数值(1和256之间的数字)。自 PHP 7.0.7 和 cURL 7.46.0 起可用。 | 
  
   
   | 
     当使用 CURLOPT_HTTPPROXYTUNNEL并发出 CONNECT 请求时,设置为true以抑制来自用户 callback
     函数CURLOPT_HEADERFUNCTION和CURLOPT_WRITEFUNCTION的代理 CONNECT
     响应 header。默认为false。自 PHP 7.3.0 和 cURL 7.54.0 起可用。 | 
  
   | CURLOPT_TCP_FASTOPEN(int) | 
     true时启用或者false时禁用 TCP Fast Open。自 PHP 7.0.7 和 cURL 7.49.0 起可用。 | 
  
   | CURLOPT_TCP_KEEPALIVE(int) | 
     如果设置为 1,将发送 TCP keepalive 探针。这些探针的延迟和频率可以通过CURLOPT_TCP_KEEPIDLE和CURLOPT_TCP_KEEPINTVL选项来控制,前提是操作系统支持它们。如果设置为0(默认值),将禁用
     keepalive 探针。可以使用CURLOPT_TCP_KEEPCNT选项设置最大探测次数。自 cURL 7.25.0 起可用。 | 
  
   | CURLOPT_TCP_KEEPIDLE(int) | 
     设置延迟秒数,如果启用了 CURLOPT_TCP_KEEPALIVE,操作系统将在连接空闲时等待,然后再发送
     keepalive 探针。并非所有操作系统都支持此选项。默认值为60。自 cURL 7.25.0 起可用。 | 
  
   | CURLOPT_TCP_KEEPINTVL(int) | 
     设置间隔(以秒为单位),如果启用了 CURLOPT_TCP_KEEPALIVE,操作系统将在发送
     keepalive 探针之间等待。并非所有操作系统都支持此选项。默认值为60。自 cURL 7.25.0 起可用。 | 
  
   | CURLOPT_TCP_KEEPCNT(int) | 
     设置 TCP 保持活动探测的最大数量。默认值为 9。自 PHP 8.4.0 和 cURL 8.9.0 起可用。 | 
  
   | CURLOPT_TCP_NODELAY(int) | 
     true时禁用 TCP 的 Nagle 算法,就是减少网络上的小数据包数量。默认是true。自 cURL 7.11.2 起可用。 | 
  
   | CURLOPT_TELNETOPTIONS(int) | 
     设置要传递给 telnet 协商的由 string 组成的 array。变量应采用
     >option=value<格式。cURL 支持选项TTYPE、XDISPLOC和NEW_ENV。自 cURL 7.7.0 起可用。 | 
  
   | CURLOPT_TFTP_BLKSIZE(int) | 
     设置用于 TFTP 数据传输的块大小。有效范围为 8-65464字节。如果未指定此选项,则使用默认值512字节。仅当远程服务器支持时才使用指定的块大小。如果服务器未返回选项确认或返回没有块大小的选项确认,则使用默认值512字节。自 cURL 7.19.4 起可用。 | 
  
   | CURLOPT_TFTP_NO_OPTIONS(int) | 
     true时不发送 TFTP 的 options 请求。默认为false。自 PHP 7.0.7 和 cURL 7.48.0 起可用。 | 
  
   | CURLOPT_TIMECONDITION(int) | 
     设置如何对待 CURLOPT_TIMEVALUE。使用CURL_TIMECOND_IFMODSINCE,仅在页面CURLOPT_TIMEVALUE之后修改,才返回页面。没有修改则返回304 Not Modifiedheader,假设设置了CURLOPT_HEADER为true。CURL_TIMECOND_IFUNMODSINCE则起相反的效果。使用CURL_TIMECOND_NONE忽略CURLOPT_TIMEVALUE并始终返回页面。默认为CURL_TIMECOND_IFMODSINCE。在 cURL 7.46.0 之前,默认值为CURL_TIMECOND_IFMODSINCE。自
     cURL 7.1.0 起可用。 | 
  
   | CURLOPT_TIMEOUT(int) | 
     允许 cURL 函数执行的最长秒数。默认值为
     0,表示函数在传输过程中永不超时。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_TIMEOUT_MS(int) | 
     允许 cURL 允许执行的最长毫秒数。如果 cURL 编译时使用系统标准的名称解析器(standard system name
     resolver),那部分的连接仍旧使用以秒计的超时解决方案,最小超时时间还是一秒钟。默认值为
     0,表示函数在传输过程中永不超时。自 cURL 7.16.2 起可用。 | 
  
   | CURLOPT_TIMEVALUE(int) | 
     秒数,从 1970 年 1 月 1 日开始。这个时间将由 CURLOPT_TIMECONDITION使用。默认0。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_TIMEVALUE_LARGE(int) | 
     自 1970 年 1 月 1 日以来的秒数。该时间将由 CURLOPT_TIMECONDITION使用。默认为 0。此选项与CURLOPT_TIMEVALUE之间的区别在于参数的类型。“long”仅用于 32 位系统上,必须使用此选项来设置 2038
     年以后的日期。自 PHP 7.3.0 和 cURL 7.59.0 起可用。 | 
  
   | CURLOPT_TLS13_CIPHERS(int) | 
     string,包含用于连接到 TLS 1.3 连接的以冒号分隔的密码套件列表。此选项目前仅在 cURL 构建为
     OpenSSL 1.1.1 或更高版本时使用。当使用不同的 SSL 后端时,可以使用 CURLOPT_SSL_CIPHER_LIST选项设置 TLS 1.3 密码套件。自 PHP 7.3.0 和 cURL 7.61.0 起可用。 | 
  
   | CURLOPT_TLSAUTH_PASSWORD(int) | 
     设置用于 CURLOPT_TLSAUTH_TYPE选项指定 TLS 身份验证方法的密码。同时也需要设置CURLOPT_TLSAUTH_USERNAME选项。此功能依赖于 TLS SRP,不适用于 TLS 1.3。自
     cURL 7.21.4 起可用。 | 
  
   | CURLOPT_TLSAUTH_TYPE(int) | 
     设置 TLS 身份验证方法的 string。支持的方法是 SRP(TLS
     安全远程密码身份验证)。自 cURL 7.21.4 起可用。 | 
  
   | CURLOPT_TLSAUTH_USERNAME(int) | 
     设置 string,其中包含要用于 CURLOPT_TLSAUTH_TYPE选项指定 TLS
     身份验证方法的用户名。同时需要设置CURLOPT_TLSAUTH_PASSWORD选项。此功能依赖于
     TLS SRP,不适用于 TLS 1.3。自 cURL 7.21.4 起可用。 | 
  
   | CURLOPT_TRANSFER_ENCODING(int) | 
     设置为 1以启用,设置为0以禁用在传出 HTTP
     请求中请求压缩传输编码。如果服务器以压缩传输编码响应,cURL
     将在接收时自动解压缩。默认为0。自 cURL 7.21.6 起可用。 | 
  
   | CURLOPT_TRANSFERTEXT(int) | 
     true时 FTP 传输使用 ASCII 模式。对于 LDAP,会检索纯文本信息而非 HTML。在 Windows 系统上,系统不会把STDOUT设置成二进制模式。默认是false。自 cURL 7.1.1 起可用。 | 
  
   | CURLOPT_UNIX_SOCKET_PATH(int) | 
     启用时使用 Unix domain socket 作为连接端点,并设置路径为指定 string。设置为 null时禁用。默认为null。自 PHP 7.0.7 和 cURL 7.40.0 起可用。 | 
  
   | CURLOPT_UNRESTRICTED_AUTH(int) | 
     true时在使用CURLOPT_FOLLOWLOCATION重定向 header 中的多个 location
     时继续发送用户名和密码信息,哪怕主机名已改变。默认为false。自 cURL 7.10.4 起可用。 | 
  
   | CURLOPT_UPKEEP_INTERVAL_MS(int) | 
     某些协议具有“连接维护”机制。这些机制通常会在现有连接上发送一些流量以保持处于活动状态。此选项定义连接维护间隔。目前,唯一具有连接维护机制的协议是
     HTTP/2。当超过连接维护间隔时,将在连接上发送 HTTP/2 PING 帧。默认为 CURL_UPKEEP_INTERVAL_DEFAULT,目前为60秒。自 PHP 8.2.0 和 cURL 7.62.0 起可用。 | 
  
   | CURLOPT_UPLOAD(int) | 
     true时准备执行上传。默认false。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_UPLOAD_BUFFERSIZE(int) | 
     cURL 上传缓冲区的首选缓冲区字节数。上传缓冲区默认为 64 KB。允许设置的最大缓冲区为 2
     MB。允许设置的最小缓冲区为 16 KB。自 PHP 8.2.0 和 cURL 7.62.0 起可用。
     | 
  
   | CURLOPT_URL(int) | 
     要获取的 URL。也可以在 curl_init() 初始化会话时设置。自 cURL 7.1.0 起可用。
     | 
  
   | CURLOPT_USE_SSL(int) | 
     设置使用 FTP、SMTP、POP3、IMAP 等进行传输时所需的 SSL/TLS 级别。这些都是从纯文本开始并使用
     STARTTLS 命令“升级”到 SSL 的协议。设置为 CURLUSESSL_*常量之一。自 cURL 7.17.0 起可用。 | 
  
   | CURLOPT_USERAGENT(int) | 
     HTTP 请求中 User-Agent: header 的内容。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_USERNAME(int) | 
     身份验证时使用的用户名。自 cURL 7.19.1 起可用。
     | 
  
   | CURLOPT_USERPWD(int) | 
     用于连接的用户名和密码,格式为 [username]:[password]。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_VERBOSE(int) | 
     true时输出所有的信息,写入到STDERR,或在CURLOPT_STDERR中指定的文件。默认false。自 cURL 7.1.0 起可用。 | 
  
   | CURLOPT_WILDCARDMATCH(int) | 
     设置为 1以根据文件名模式传输多个文件。该模式可以指定为CURLOPT_URL选项的一部分,在 URL(文件名)的最后一部分使用类似 fnmatch 的模式(Shell 模式匹配)。自 cURL 7.21.0 起可用。 | 
  
   | CURLOPT_WRITEFUNCTION(int) | 
     具有以下签名的 callable:
      
      
       数据必须使用 callback 保存,并且 callback 必须返回写入的准确字节数,否则传输将因错误而中止。自 cURL 7.1.0 起可用。curlHandle
        
         cURL 句柄。
        
       data
        
         要写入的数据
        
        | 
  
   
   | 
     接受文件句柄 resource,将传输的 header 部分写入该文件。自 cURL 7.1.0 起可用。
     | 
  
   | CURLOPT_WS_OPTIONS(int) | 
     接受位掩码设置 WebSocket 行为选项。唯一可用的选项是 CURLWS_RAW_MODE。默认为0。自 PHP 8.3.0 和 cURL 7.86.0 起可用。 | 
  
   | CURLOPT_XFERINFOFUNCTION(int) | 
     具有以下签名的 callable:
      
      callback(    resource $curlHandle,    int $bytesToDownload,    int $bytesDownloaded,    int $bytesToUpload,    int $bytesUploaded): int 
      
       返回curlHandle
        
         cURL 句柄。
        
       bytesToDownload
        
         本次传输预计下载的总字节数。
        
       bytesDownloaded
        
         迄今已下载的字节数。
        
       bytesToUpload
        
         本次传输预计上传的总字节数。
        
       bytesUploaded
        
         迄今已上传的字节数。
        
        1可中止传输并设置CURLE_ABORTED_BY_CALLBACK错误。自 PHP 8.2.0 和 cURL 7.32.0 起可用。 | 
  
   | CURLOPT_SERVER_RESPONSE_TIMEOUT(int) | 
     cURL 将等待来自 FTP、SFTP、IMAP、SCP、SMTP
     或 POP3 服务器响应的超时秒数。此选项取代了现有的 CURLOPT_FTP_RESPONSE_TIMEOUT选项,该选项在
     cURL 7.85.0 中已弃用。自 PHP 8.4.0 起可用。 | 
  
   | CURLOPT_XOAUTH2_BEARER(int) | 
     指定 OAuth 2.0 访问 token。设置为 null以禁用。默认为null。自 PHP 7.0.7 和 cURL 7.33.0 起可用。 | 
  
   | CURLOPT_PREREQFUNCTION(int) | 
     具有以下签名的 callable,在建立连接之后但在发送请求负载(例如,HTTP 连接的
     GET/POST/DELETE 请求)之前调用,可用于根据源和目标 IP 地址和端口号中止或允许连接:
      
      
       返回curlHandle
        
         cURL 句柄。
        
       destination_ip
        
         使用此连接建立的远程服务器的主 IP。对于 FTP,这是控制连接的 IP。IPv6 地址不带括号。
        
       local_ip
        
         此连接的原始 IP。IPv6 地址不带括号。
        
       destination_port
        
         使用此连接建立的远程服务器上的主端口号。对于 FTP,这是控制连接的端口。根据协议的不同,这可能是
         TCP 或 UDP 端口号。
        
       local_port
        
         此连接的发起端口号。根据协议的不同,这可能是 TCP 或 UDP 端口号。
        
        CURL_PREREQFUNC_OK以允许请求,或返回CURL_PREREQFUNC_ABORT以中止传输。自 PHP 8.4.0 和 cURL 7.80.0 起可用。 | 
  
   | CURLOPT_DEBUGFUNCTION(int) | 
     自 PHP 8.4.0 起可用。此选项需要启用 CURLOPT_VERBOSE选项。callable
     来替换标准 cURL 详细输出。此回调在请求的各个阶段使用详细调试信息进行调用。回调应与以下签名匹配: 
      
       curlHandle
        
         cURL 句柄。
        
       type
        
         下列常量之一表示 data值的类型:data
        
         type参数表示的类型的详细调试数据。 |