2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 06:43:42 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.curl-setopt" xmlns="http://docbook.org/ns/docbook">
|
2007-01-16 20:18:05 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>curl_setopt</refname>
|
2007-01-17 00:14:52 +00:00
|
|
|
<refpurpose>Set an option for a cURL transfer</refpurpose>
|
2007-01-16 20:18:05 +00:00
|
|
|
</refnamediv>
|
2007-01-17 00:14:52 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-01-16 20:18:05 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>curl_setopt</methodname>
|
2020-11-25 00:58:58 +00:00
|
|
|
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
|
2007-01-16 20:18:05 +00:00
|
|
|
<methodparam><type>int</type><parameter>option</parameter></methodparam>
|
|
|
|
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-01-17 00:14:52 +00:00
|
|
|
Sets an option on the given cURL session handle.
|
2007-01-16 20:18:05 +00:00
|
|
|
</para>
|
2007-01-17 00:14:52 +00:00
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2007-01-17 00:14:52 +00:00
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
2007-01-16 20:18:05 +00:00
|
|
|
<para>
|
2007-01-17 00:14:52 +00:00
|
|
|
<variablelist>
|
|
|
|
&curl.ch.description;
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>option</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-06-08 02:07:11 +00:00
|
|
|
The <literal>CURLOPT_XXX</literal> option to set.
|
2007-01-17 00:14:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>value</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The value to be set on <parameter>option</parameter>.
|
|
|
|
</para>
|
|
|
|
<para>
|
2010-03-18 15:27:51 +00:00
|
|
|
<parameter>value</parameter> should be a <type>bool</type> for the
|
2007-01-17 00:14:52 +00:00
|
|
|
following values of the <parameter>option</parameter> parameter:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">Option</entry>
|
|
|
|
<entry valign="top">Set <parameter>value</parameter> to</entry>
|
|
|
|
<entry valign="top">Notes</entry>
|
2007-01-17 00:14:52 +00:00
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_AUTOREFERER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to automatically set the <literal>Referer:</literal> field in
|
|
|
|
requests where it follows a <literal>Location:</literal> redirect.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_BINARYTRANSFER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to return the raw output when
|
|
|
|
<constant>CURLOPT_RETURNTRANSFER</constant> is used.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2012-11-05 03:29:07 +00:00
|
|
|
From PHP 5.1.3, this option has no effect: the raw output will
|
|
|
|
always be returned when
|
|
|
|
<constant>CURLOPT_RETURNTRANSFER</constant> is used.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_COOKIESESSION</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to mark this as a new cookie "session". It will force libcurl
|
|
|
|
to ignore all cookies it is about to load that are "session cookies"
|
|
|
|
from the previous session. By default, libcurl always stores and
|
2008-12-22 11:38:58 +00:00
|
|
|
loads all cookies, independent if they are session cookies or not.
|
2007-01-17 00:14:52 +00:00
|
|
|
Session cookies are cookies without expiry date and they are meant
|
|
|
|
to be alive and existing for this "session" only.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2010-10-19 04:29:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_CERTINFO</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to output SSL certification information to <literal>STDERR</literal>
|
|
|
|
on secure transfers.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2012-11-15 13:40:31 +00:00
|
|
|
Added in cURL 7.19.1.
|
|
|
|
Available since PHP 5.3.2.
|
|
|
|
Requires <constant>CURLOPT_VERBOSE</constant> to be on to have an effect.
|
2010-10-19 04:29:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2013-10-04 16:18:41 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_CONNECT_ONLY</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; tells the library to perform all the required proxy authentication
|
|
|
|
and connection setup, but no data transfer. This option is implemented for
|
|
|
|
HTTP, SMTP and POP3.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in 7.15.2.
|
|
|
|
Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CRLF</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to convert Unix newlines to CRLF newlines
|
|
|
|
on transfers.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DISALLOW_USERNAME_IN_URL</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to not allow URLs that include a username. Usernames are allowed by default (0).
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.61.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_SHUFFLE_ADDRESSES</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to shuffle the order of all returned addresses so that they will be used
|
|
|
|
in a random order, when a name is resolved and more than one IP address is returned.
|
|
|
|
This may cause IPv4 to be used before IPv6 or vice versa.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.60.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_HAPROXYPROTOCOL</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to send an HAProxy PROXY protocol v1 header at the start of the connection.
|
|
|
|
The default action is not to send this header.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.60.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSH_COMPRESSION</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to enable built-in SSH compression. This is a request, not an order;
|
|
|
|
the server may or may not do it.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.56.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_USE_GLOBAL_CACHE</constant></entry>
|
|
|
|
<entry valign="top">
|
2019-04-04 14:04:02 +00:00
|
|
|
&true; to use a global DNS cache. This option is not thread-safe.
|
|
|
|
It is conditionally enabled by default if PHP is built for non-threaded use
|
2019-04-05 20:07:42 +00:00
|
|
|
(CLI, FCGI, Apache2-Prefork, etc.).
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FAILONERROR</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-10-09 06:30:16 +00:00
|
|
|
&true; to fail verbosely if the HTTP code returned
|
2007-01-17 00:14:52 +00:00
|
|
|
is greater than or equal to 400. The default behavior is to return
|
|
|
|
the page normally, ignoring the code.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_FALSESTART</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to enable TLS false start.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.42.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FILETIME</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to attempt to retrieve the modification
|
2007-06-08 02:07:11 +00:00
|
|
|
date of the remote document. This value can be retrieved using
|
2020-03-20 15:07:42 +00:00
|
|
|
the <constant>CURLINFO_FILETIME</constant> option with
|
2007-01-17 00:14:52 +00:00
|
|
|
<function>curl_getinfo</function>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FOLLOWLOCATION</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to follow any
|
|
|
|
<literal>"Location: "</literal> header that the server sends as
|
|
|
|
part of the HTTP header (note this is recursive, PHP will follow as
|
|
|
|
many <literal>"Location: "</literal> headers that it is sent,
|
|
|
|
unless <constant>CURLOPT_MAXREDIRS</constant> is set).
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FORBID_REUSE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to force the connection to explicitly
|
|
|
|
close when it has finished processing, and not be pooled for reuse.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FRESH_CONNECT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to force the use of a new connection
|
|
|
|
instead of a cached one.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTP_USE_EPRT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to use EPRT (and LPRT) when doing active
|
|
|
|
FTP downloads. Use &false; to disable EPRT and LPRT and use PORT
|
|
|
|
only.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTP_USE_EPSV</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to first try an EPSV command for FTP
|
|
|
|
transfers before reverting back to PASV. Set to &false;
|
|
|
|
to disable EPSV.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2012-01-21 22:25:03 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_FTP_CREATE_MISSING_DIRS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to create missing directories when an FTP operation
|
|
|
|
encounters a path that currently doesn't exist.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTPAPPEND</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to append to the remote file instead of
|
|
|
|
overwriting it.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2014-03-26 14:31:37 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TCP_NODELAY</constant></entry>
|
|
|
|
<entry valign="top">
|
2015-06-14 15:43:31 +00:00
|
|
|
&true; to disable TCP's Nagle algorithm, which tries to minimize
|
|
|
|
the number of small packets on the network.
|
2014-03-26 14:31:37 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or
|
|
|
|
greater.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTPASCII</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An alias of
|
|
|
|
<constant>CURLOPT_TRANSFERTEXT</constant>. Use that instead.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTPLISTONLY</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to only list the names of an FTP
|
|
|
|
directory.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HEADER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to include the header in the output.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2010-01-06 08:30:47 +00:00
|
|
|
<row>
|
|
|
|
<entry><constant>CURLINFO_HEADER_OUT</constant></entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2010-01-06 08:30:47 +00:00
|
|
|
&true; to track the handle's request string.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2010-01-06 08:30:47 +00:00
|
|
|
Available since PHP 5.1.3. The <constant>CURLINFO_</constant>
|
|
|
|
prefix is intentional.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-01-26 13:42:43 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_HTTP09_ALLOWED </constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Whether to allow HTTP/0.9 responses. Defaults to &false; as of libcurl 7.66.0;
|
|
|
|
formerly it defaulted to &true;.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0
|
2020-01-26 13:42:43 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTPGET</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to reset the HTTP request method to GET.
|
|
|
|
Since GET is the default, this is only necessary if the request
|
|
|
|
method has been changed.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTPPROXYTUNNEL</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to tunnel through a given HTTP proxy.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-01-12 10:11:39 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_HTTP_CONTENT_DECODING</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&false; to get the raw HTTP response body.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available as of PHP 5.5.0 if built against libcurl >= 7.16.2.
|
2020-01-12 10:11:39 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_KEEP_SENDING_ON_ERROR</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to keep sending the request body if the HTTP code returned is
|
|
|
|
equal to or larger than 300. The default action would be to stop sending
|
|
|
|
and close the stream or connection. Suitable for manual NTLM authentication.
|
|
|
|
Most applications do not need this option.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available as of PHP 7.3.0 if built against libcurl >= 7.51.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_MUTE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to be completely silent with regards to
|
|
|
|
the cURL functions.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2012-12-18 22:19:42 +00:00
|
|
|
Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead)
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_NETRC</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-06-08 02:07:11 +00:00
|
|
|
&true; to scan the <filename>~/.netrc</filename>
|
|
|
|
file to find a username and password for the remote site that
|
|
|
|
a connection is being established with.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_NOBODY</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to exclude the body from the output.
|
2008-11-07 10:26:43 +00:00
|
|
|
Request method is then set to HEAD. Changing this to &false; does
|
|
|
|
not change it to GET.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_NOPROGRESS</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to disable the progress meter for cURL transfers.
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
PHP automatically sets this option to &true;, this should only be
|
|
|
|
changed for debugging purposes.
|
|
|
|
</para>
|
|
|
|
</note>
|
2009-05-02 15:53:16 +00:00
|
|
|
</para></entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_NOSIGNAL</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to ignore any cURL function that causes a
|
|
|
|
signal to be sent to the PHP process. This is turned on by default
|
|
|
|
in multi-threaded SAPIs so timeout options can still be used.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.10.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PATH_AS_IS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to not handle dot dot sequences.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.42.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PIPEWAIT</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to wait for pipelining/multiplexing.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.43.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_POST</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to do a regular HTTP POST. This POST is the
|
|
|
|
normal <literal>application/x-www-form-urlencoded</literal> kind,
|
|
|
|
most commonly used by HTML forms.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PUT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to HTTP PUT a file. The file to PUT must
|
|
|
|
be set with <constant>CURLOPT_INFILE</constant> and
|
|
|
|
<constant>CURLOPT_INFILESIZE</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_RETURNTRANSFER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to return the transfer as a string of the
|
|
|
|
return value of <function>curl_exec</function> instead of outputting
|
2018-05-08 11:38:46 +00:00
|
|
|
it directly.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SASL_IR</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to enable sending the initial response in the first packet.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.31.10. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_ENABLE_ALPN</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&false; to disable ALPN in the SSL handshake (if the SSL backend
|
|
|
|
libcurl is built to use supports it), which can be used to
|
|
|
|
negotiate http2.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.36.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_ENABLE_NPN</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&false; to disable NPN in the SSL handshake (if the SSL backend
|
|
|
|
libcurl is built to use supports it), which can be used to
|
|
|
|
negotiate http2.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.36.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_VERIFYPEER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&false; to stop cURL from verifying the peer's
|
|
|
|
certificate. Alternate certificates to verify against can be
|
|
|
|
specified with the <constant>CURLOPT_CAINFO</constant> option
|
|
|
|
or a certificate directory can be specified with the
|
|
|
|
<constant>CURLOPT_CAPATH</constant> option.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; by default as of cURL 7.10. Default bundle installed as of
|
|
|
|
cURL 7.10.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_VERIFYSTATUS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to verify the certificate's status.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.41.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSL_VERIFYPEER</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&false; to stop cURL from verifying the peer's certificate.
|
|
|
|
Alternate certificates to verify against can be
|
|
|
|
specified with the <constant>CURLOPT_CAINFO</constant> option
|
|
|
|
or a certificate directory can be specified with the
|
|
|
|
<constant>CURLOPT_CAPATH</constant> option.
|
|
|
|
When set to false, the peer certificate verification succeeds regardless.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
&true; by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SUPPRESS_CONNECT_HEADERS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to suppress proxy CONNECT response headers from the user callback functions
|
|
|
|
<constant>CURLOPT_HEADERFUNCTION</constant> and <constant>CURLOPT_WRITEFUNCTION</constant>,
|
|
|
|
when <constant>CURLOPT_HTTPPROXYTUNNEL</constant> is used and a CONNECT request is made.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.54.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TCP_FASTOPEN</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to enable TCP Fast Open.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.49.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TFTP_NO_OPTIONS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
&true; to not send TFTP options requests.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.48.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_TRANSFERTEXT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to use ASCII mode for FTP transfers.
|
|
|
|
For LDAP, it retrieves data in plain text instead of HTML. On
|
|
|
|
Windows systems, it will not set <literal>STDOUT</literal> to binary
|
|
|
|
mode.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_UNRESTRICTED_AUTH</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to keep sending the username and password
|
|
|
|
when following locations (using
|
|
|
|
<constant>CURLOPT_FOLLOWLOCATION</constant>), even when the
|
|
|
|
hostname has changed.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_UPLOAD</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to prepare for an upload.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_VERBOSE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
&true; to output verbose information. Writes
|
|
|
|
output to <literal>STDERR</literal>, or the file specified using
|
|
|
|
<constant>CURLOPT_STDERR</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
2020-11-02 15:39:04 +00:00
|
|
|
<parameter>value</parameter> should be an <type>int</type> for the
|
2007-01-17 00:14:52 +00:00
|
|
|
following values of the <parameter>option</parameter> parameter:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
<entry>Notes</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_BUFFERSIZE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The size of the buffer to use for each read. There is no guarantee
|
|
|
|
this request will be fulfilled, however.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.10.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CLOSEPOLICY</constant></entry>
|
|
|
|
<entry valign="top">
|
2014-02-27 11:10:24 +00:00
|
|
|
One of the <constant>CURLCLOSEPOLICY_*</constant> values.
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
This option is deprecated, as it was never implemented in cURL and
|
|
|
|
never had any effect.
|
|
|
|
</para>
|
|
|
|
</note>
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2014-02-27 11:10:24 +00:00
|
|
|
Removed in PHP 5.6.0.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry><constant>CURLOPT_CONNECTTIMEOUT</constant></entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-04-25 21:57:07 +00:00
|
|
|
The number of seconds to wait while trying to connect. Use 0 to
|
2007-01-17 00:14:52 +00:00
|
|
|
wait indefinitely.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2009-04-25 21:57:07 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CONNECTTIMEOUT_MS</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-04-25 21:57:07 +00:00
|
|
|
The number of milliseconds to wait while trying to connect. Use 0 to
|
|
|
|
wait indefinitely.
|
2011-02-10 15:24:02 +00:00
|
|
|
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
|
|
|
|
If libcurl is built to use the standard system name resolver, that
|
|
|
|
portion of the connect will still use full-second resolution for
|
|
|
|
timeouts with a minimum timeout allowed of one second.
|
2009-04-25 21:57:07 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2012-11-15 13:40:31 +00:00
|
|
|
Added in cURL 7.16.2. Available since PHP 5.2.3.
|
2009-04-25 21:57:07 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_CACHE_TIMEOUT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The number of seconds to keep DNS entries in memory. This
|
|
|
|
option is set to 120 (2 minutes) by default.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The timeout for Expect: 100-continue responses in milliseconds.
|
|
|
|
Defaults to 1000 milliseconds.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.36.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts
|
|
|
|
to connect to both IPv4 and IPv6 addresses for dual-stack hosts,
|
|
|
|
preferring IPv6 first for timeout milliseconds.
|
|
|
|
Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.59.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTPSSLAUTH</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The FTP authentication method (when is activated):
|
|
|
|
<literal>CURLFTPAUTH_SSL</literal> (try SSL first),
|
|
|
|
<literal>CURLFTPAUTH_TLS</literal> (try TLS first), or
|
|
|
|
<literal>CURLFTPAUTH_DEFAULT</literal> (let cURL decide).
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.12.2.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_HEADEROPT</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
How to deal with headers. One of the following constants:
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLHEADER_UNIFIED</constant>: the headers specified in
|
|
|
|
<constant>CURLOPT_HTTPHEADER</constant> will be used in requests
|
|
|
|
both to servers and proxies. With this option enabled,
|
|
|
|
<constant>CURLOPT_PROXYHEADER</constant> will not have any effect.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLHEADER_SEPARATE</constant>: makes
|
|
|
|
<constant>CURLOPT_HTTPHEADER</constant> headers only get sent to
|
|
|
|
a server and not to a proxy. Proxy headers must be set with
|
|
|
|
<constant>CURLOPT_PROXYHEADER</constant> to get used. Note that if
|
|
|
|
a non-CONNECT request is sent to a proxy, libcurl will send both
|
|
|
|
server headers and proxy headers. When doing CONNECT, libcurl will
|
|
|
|
send <constant>CURLOPT_PROXYHEADER</constant> headers only to the
|
|
|
|
proxy and then <constant>CURLOPT_HTTPHEADER</constant> headers
|
|
|
|
only to the server.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
Defaults to <constant>CURLHEADER_SEPARATE</constant> as of cURL
|
|
|
|
7.42.1, and <constant>CURLHEADER_UNIFIED</constant> before.
|
|
|
|
</simpara>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.37.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTP_VERSION</constant></entry>
|
|
|
|
<entry valign="top">
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURL_HTTP_VERSION_NONE</constant> (default, lets CURL
|
2007-01-17 00:14:52 +00:00
|
|
|
decide which version to use),
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURL_HTTP_VERSION_1_0</constant> (forces HTTP/1.0),
|
2020-03-20 15:10:04 +00:00
|
|
|
<constant>CURL_HTTP_VERSION_1_1</constant> (forces HTTP/1.1),
|
|
|
|
<constant>CURL_HTTP_VERSION_2_0</constant> (attempts HTTP 2),
|
|
|
|
<constant>CURL_HTTP_VERSION_2 </constant> (alias of <constant>CURL_HTTP_VERSION_2_0</constant>),
|
|
|
|
<constant>CURL_HTTP_VERSION_2TLS</constant> (attempts HTTP 2 over TLS (HTTPS) only) or
|
|
|
|
<constant>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</constant> (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade).
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTPAUTH</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
<para>
|
|
|
|
The HTTP authentication method(s) to use. The options are:
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_BASIC</constant>,
|
|
|
|
<constant>CURLAUTH_DIGEST</constant>,
|
|
|
|
<constant>CURLAUTH_GSSNEGOTIATE</constant>,
|
|
|
|
<constant>CURLAUTH_NTLM</constant>,
|
|
|
|
<constant>CURLAUTH_ANY</constant>, and
|
|
|
|
<constant>CURLAUTH_ANYSAFE</constant>.
|
2007-01-17 00:14:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2007-06-08 02:07:11 +00:00
|
|
|
The bitwise <literal>|</literal> (or) operator can be used to combine
|
|
|
|
more than one method. If this is done, cURL will poll the server to see
|
2007-01-17 00:14:52 +00:00
|
|
|
what methods it supports and pick the best one.
|
|
|
|
</para>
|
|
|
|
<para>
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_ANY</constant> is an alias for
|
2007-01-17 00:14:52 +00:00
|
|
|
<literal>CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
|
|
|
|
</para>
|
|
|
|
<para>
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_ANYSAFE</constant> is an alias for
|
2007-01-17 00:14:52 +00:00
|
|
|
<literal>CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
|
|
|
|
</para>
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_INFILESIZE</constant></entry>
|
|
|
|
<entry valign="top">
|
2011-04-19 06:27:54 +00:00
|
|
|
The expected size, in bytes, of the file when uploading a file to
|
|
|
|
a remote site. Note that using this option will not stop libcurl
|
|
|
|
from sending more data, as exactly what is sent depends on
|
|
|
|
<constant>CURLOPT_READFUNCTION</constant>.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_LOW_SPEED_LIMIT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The transfer speed, in bytes per second, that the transfer should be
|
2010-02-23 15:31:22 +00:00
|
|
|
below during the count of <constant>CURLOPT_LOW_SPEED_TIME</constant>
|
|
|
|
seconds before PHP considers the transfer too slow and aborts.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_LOW_SPEED_TIME</constant></entry>
|
|
|
|
<entry valign="top">
|
2010-02-23 15:31:22 +00:00
|
|
|
The number of seconds the transfer speed should be below
|
|
|
|
<constant>CURLOPT_LOW_SPEED_LIMIT</constant> before PHP considers
|
|
|
|
the transfer too slow and aborts.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_MAXCONNECTS</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The maximum amount of persistent connections that are allowed.
|
|
|
|
When the limit is reached,
|
|
|
|
<constant>CURLOPT_CLOSEPOLICY</constant> is used to determine
|
|
|
|
which connection to close.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_MAXREDIRS</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The maximum amount of HTTP redirections to follow. Use this option
|
|
|
|
alongside <constant>CURLOPT_FOLLOWLOCATION</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PORT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An alternative port number to connect to.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2015-01-10 22:08:04 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_POSTREDIR</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
A bitmask of 1 (301 Moved Permanently), 2 (302 Found)
|
|
|
|
and 4 (303 See Other) if the HTTP POST method should be maintained
|
|
|
|
when <constant>CURLOPT_FOLLOWLOCATION</constant> is set and a
|
|
|
|
specific type of redirect occurs.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.19.1. Available since PHP 5.3.2.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2009-03-14 01:52:43 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROTOCOLS</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-05-02 15:53:16 +00:00
|
|
|
<para>
|
|
|
|
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
|
|
|
|
limits what protocols libcurl may use in the transfer. This allows you to have
|
|
|
|
a libcurl built to support a wide range of protocols but still limit specific
|
|
|
|
transfers to only be allowed to use a subset of them. By default libcurl will
|
|
|
|
accept all protocols it supports.
|
|
|
|
See also <constant>CURLOPT_REDIR_PROTOCOLS</constant>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Valid protocol options are:
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLPROTO_HTTP</constant>,
|
|
|
|
<constant>CURLPROTO_HTTPS</constant>,
|
|
|
|
<constant>CURLPROTO_FTP</constant>,
|
|
|
|
<constant>CURLPROTO_FTPS</constant>,
|
|
|
|
<constant>CURLPROTO_SCP</constant>,
|
|
|
|
<constant>CURLPROTO_SFTP</constant>,
|
|
|
|
<constant>CURLPROTO_TELNET</constant>,
|
|
|
|
<constant>CURLPROTO_LDAP</constant>,
|
|
|
|
<constant>CURLPROTO_LDAPS</constant>,
|
|
|
|
<constant>CURLPROTO_DICT</constant>,
|
|
|
|
<constant>CURLPROTO_FILE</constant>,
|
|
|
|
<constant>CURLPROTO_TFTP</constant>,
|
|
|
|
<constant>CURLPROTO_ALL</constant>
|
2009-05-02 15:53:16 +00:00
|
|
|
</para>
|
2009-03-14 01:52:43 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-05-02 15:53:16 +00:00
|
|
|
Added in cURL 7.19.4.
|
2009-03-14 01:52:43 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROXYAUTH</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-05-02 15:53:16 +00:00
|
|
|
The HTTP authentication method(s) to use for the proxy connection.
|
|
|
|
Use the same bitmasks as described in
|
|
|
|
<constant>CURLOPT_HTTPAUTH</constant>. For proxy authentication,
|
2020-03-20 15:07:42 +00:00
|
|
|
only <constant>CURLAUTH_BASIC</constant> and
|
|
|
|
<constant>CURLAUTH_NTLM</constant> are currently supported.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.10.7.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROXYPORT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The port number of the proxy to connect to. This port number can
|
|
|
|
also be set in <constant>CURLOPT_PROXY</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROXYTYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
2015-06-27 11:39:14 +00:00
|
|
|
Either <constant>CURLPROXY_HTTP</constant> (default),
|
|
|
|
<constant>CURLPROXY_SOCKS4</constant>,
|
|
|
|
<constant>CURLPROXY_SOCKS5</constant>,
|
|
|
|
<constant>CURLPROXY_SOCKS4A</constant> or
|
|
|
|
<constant>CURLPROXY_SOCKS5_HOSTNAME</constant>.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.10.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2009-03-14 01:52:43 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_REDIR_PROTOCOLS</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-03-14 01:52:43 +00:00
|
|
|
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
|
2009-05-02 15:53:16 +00:00
|
|
|
limits what protocols libcurl may use in a transfer that it follows to in
|
|
|
|
a redirect when <constant>CURLOPT_FOLLOWLOCATION</constant> is enabled.
|
|
|
|
This allows you to limit specific transfers to only be allowed to use a subset
|
|
|
|
of protocols in redirections. By default libcurl will allow all protocols
|
|
|
|
except for FILE and SCP. This is a difference compared to pre-7.19.4 versions
|
|
|
|
which unconditionally would follow to all protocols supported.
|
|
|
|
See also <constant>CURLOPT_PROTOCOLS</constant> for protocol constant values.
|
2009-03-14 01:52:43 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-05-02 15:53:16 +00:00
|
|
|
Added in cURL 7.19.4.
|
2009-03-14 01:52:43 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_RESUME_FROM</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The offset, in bytes, to resume a transfer from.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SOCKS5_AUTH</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
<para>
|
|
|
|
The SOCKS5 authentication method(s) to use. The options are:
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_BASIC</constant>,
|
|
|
|
<constant>CURLAUTH_GSSAPI</constant>,
|
|
|
|
<constant>CURLAUTH_NONE</constant>.
|
2020-02-05 08:54:11 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The bitwise <literal>|</literal> (or) operator can be used to combine
|
|
|
|
more than one method. If this is done, cURL will poll the server to see
|
|
|
|
what methods it supports and pick the best one.
|
|
|
|
</para>
|
|
|
|
<para>
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_BASIC</constant> allows username/password authentication.
|
2020-02-05 08:54:11 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_GSSAPI</constant> allows GSS-API authentication.
|
2020-02-05 08:54:11 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURLAUTH_NONE</constant> allows no authentication.
|
2020-02-05 08:54:11 +00:00
|
|
|
</para>
|
2020-02-10 14:30:32 +00:00
|
|
|
<para>
|
|
|
|
Defaults to <literal>CURLAUTH_BASIC|CURLAUTH_GSSAPI</literal>.
|
|
|
|
Set the actual username and password with the <constant>CURLOPT_PROXYUSERPWD</constant> option.
|
|
|
|
</para>
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available as of 7.3.0 and curl >= 7.55.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_OPTIONS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set SSL behavior options, which is a bitmask of any of the following constants:
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
|
|
|
|
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
|
|
|
|
revocation checks for those SSL backends where such behavior is
|
|
|
|
present.
|
|
|
|
</simpara>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.25.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_VERIFYHOST</constant></entry>
|
|
|
|
<entry valign="top">
|
2016-12-30 12:10:29 +00:00
|
|
|
<literal>1</literal> to check the existence of a common name in the
|
|
|
|
SSL peer certificate. <literal>2</literal> to check the existence of
|
2007-01-17 00:14:52 +00:00
|
|
|
a common name and also verify that it matches the hostname
|
2016-12-30 12:10:29 +00:00
|
|
|
provided. <literal>0</literal> to not check the names. In production environments the value of this option
|
|
|
|
should be kept at <literal>2</literal> (default value).
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2016-12-30 12:10:29 +00:00
|
|
|
Support for value <literal>1</literal> removed in cURL 7.28.1.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLVERSION</constant></entry>
|
|
|
|
<entry valign="top">
|
2014-10-16 17:51:38 +00:00
|
|
|
One of <constant>CURL_SSLVERSION_DEFAULT</constant> (0),
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1</constant> (1),
|
2014-10-19 00:00:33 +00:00
|
|
|
<constant>CURL_SSLVERSION_SSLv2</constant> (2),
|
|
|
|
<constant>CURL_SSLVERSION_SSLv3</constant> (3),
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_0</constant> (4),
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5) or
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_2</constant> (6).
|
2020-03-12 16:07:42 +00:00
|
|
|
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_*</constant>
|
|
|
|
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_*</constant>
|
|
|
|
constants with one of the <constant>CURL_SSLVERSION_MAX_*</constant> constants.
|
|
|
|
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant> (the maximum version supported by the library),
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>, or
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant>.
|
2014-10-16 17:51:38 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
2014-10-19 00:00:33 +00:00
|
|
|
Your best bet is to not set this and let it use the default.
|
|
|
|
Setting it to 2 or 3 is very dangerous given the known
|
|
|
|
vulnerabilities in SSLv2 and SSLv3.
|
2014-10-16 17:51:38 +00:00
|
|
|
</para>
|
|
|
|
</note>
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSL_OPTIONS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set proxy SSL behavior options, which is a bitmask of any of the following constants:
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
|
|
|
|
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
|
|
|
|
revocation checks for those SSL backends where such behavior is
|
2020-11-25 00:58:58 +00:00
|
|
|
present. (curl >= 7.44.0)
|
2020-02-05 08:54:11 +00:00
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
<constant>CURLSSLOPT_NO_PARTIALCHAIN</constant>: do not accept "partial"
|
2020-11-25 00:58:58 +00:00
|
|
|
certificate chains, which it otherwise does by default. (curl >= 7.68.0)
|
2020-02-05 08:54:11 +00:00
|
|
|
</simpara>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSL_VERIFYHOST</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set to <literal>2</literal> to verify in the HTTPS proxy's certificate name fields against the proxy name.
|
|
|
|
When set to <literal>0</literal> the connection succeeds regardless of the names used in the certificate.
|
|
|
|
Use that ability with caution!
|
|
|
|
<literal>1</literal> treated as a debug option in curl 7.28.0 and earlier.
|
|
|
|
From curl 7.28.1 to 7.65.3 <constant>CURLE_BAD_FUNCTION_ARGUMENT</constant> is returned.
|
|
|
|
From curl 7.66.0 onwards <literal>1</literal> and <literal>2</literal> is treated as the same value.
|
|
|
|
In production environments the value of this option should be kept at <literal>2</literal> (default value).
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSLVERSION</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
One of <constant>CURL_SSLVERSION_DEFAULT</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_0</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_1</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_2</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_TLSv1_3</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
|
2020-03-12 16:07:42 +00:00
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
|
2020-02-05 08:54:11 +00:00
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>,
|
|
|
|
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant> or
|
|
|
|
<constant>CURL_SSLVERSION_SSLv3</constant>.
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Your best bet is to not set this and let it use the default <constant>CURL_SSLVERSION_DEFAULT</constant>
|
|
|
|
which will attempt to figure out the remote SSL protocol version.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_STREAM_WEIGHT</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set the numerical stream weight (a number between 1 and 256).
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.46.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-03-12 17:08:49 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TCP_KEEPALIVE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
If set to <literal>1</literal>, TCP keepalive probes will be sent. The delay and
|
|
|
|
frequency of these probes can be controlled by the <constant>CURLOPT_TCP_KEEPIDLE</constant>
|
|
|
|
and <constant>CURLOPT_TCP_KEEPINTVL</constant> options, provided the operating system
|
|
|
|
supports them. If set to <literal>0</literal> (default) keepalive probes are disabled.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.25.0. Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TCP_KEEPIDLE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Sets the delay, in seconds, that the operating system will wait while the connection is
|
|
|
|
idle before sending keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is
|
|
|
|
enabled. Not all operating systems support this option.
|
|
|
|
The default is <literal>60</literal>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.25.0. Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TCP_KEEPINTVL</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Sets the interval, in seconds, that the operating system will wait between sending
|
|
|
|
keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is enabled.
|
|
|
|
Not all operating systems support this option.
|
|
|
|
The default is <literal>60</literal>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.25.0. Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_TIMECONDITION</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
How <constant>CURLOPT_TIMEVALUE</constant> is treated.
|
2020-03-20 15:07:42 +00:00
|
|
|
Use <constant>CURL_TIMECOND_IFMODSINCE</constant> to return the
|
2007-01-17 00:14:52 +00:00
|
|
|
page only if it has been modified since the time specified in
|
|
|
|
<constant>CURLOPT_TIMEVALUE</constant>. If it hasn't been modified,
|
|
|
|
a <literal>"304 Not Modified"</literal> header will be returned
|
|
|
|
assuming <constant>CURLOPT_HEADER</constant> is &true;.
|
2020-03-20 15:07:42 +00:00
|
|
|
Use <constant>CURL_TIMECOND_IFUNMODSINCE</constant> for the reverse
|
|
|
|
effect. <constant>CURL_TIMECOND_IFMODSINCE</constant> is the
|
2007-01-17 00:14:52 +00:00
|
|
|
default.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_TIMEOUT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The maximum number of seconds to allow cURL functions to execute.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2009-04-25 21:57:07 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_TIMEOUT_MS</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-04-25 21:57:07 +00:00
|
|
|
The maximum number of milliseconds to allow cURL functions to
|
|
|
|
execute.
|
2011-02-10 15:24:02 +00:00
|
|
|
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
|
|
|
|
If libcurl is built to use the standard system name resolver, that
|
|
|
|
portion of the connect will still use full-second resolution for
|
|
|
|
timeouts with a minimum timeout allowed of one second.
|
2009-04-25 21:57:07 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2012-11-15 13:40:31 +00:00
|
|
|
Added in cURL 7.16.2. Available since PHP 5.2.3.
|
2009-04-25 21:57:07 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_TIMEVALUE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The time in seconds since January 1st, 1970. The time will be used
|
|
|
|
by <constant>CURLOPT_TIMECONDITION</constant>. By default,
|
2020-03-20 15:07:42 +00:00
|
|
|
<constant>CURL_TIMECOND_IFMODSINCE</constant> is used.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TIMEVALUE_LARGE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The time in seconds since January 1st, 1970. The time will be used
|
|
|
|
by <constant>CURLOPT_TIMECONDITION</constant>. Defaults to zero.
|
|
|
|
The difference between this option and <constant>CURLOPT_TIMEVALUE</constant>
|
|
|
|
is the type of the argument. On systems where 'long' is only 32 bit wide,
|
|
|
|
this option has to be used to set dates beyond the year 2038.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.59.0. Available since PHP 7.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2011-06-30 13:10:16 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_MAX_RECV_SPEED_LARGE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
If a download exceeds this speed (counted in bytes per second) on
|
|
|
|
cumulative average during the transfer, the transfer will pause to
|
|
|
|
keep the average rate less than or equal to the parameter value.
|
|
|
|
Defaults to unlimited speed.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.15.5. Available since PHP 5.4.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_MAX_SEND_SPEED_LARGE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
If an upload exceeds this speed (counted in bytes per second) on
|
|
|
|
cumulative average during the transfer, the transfer will pause to
|
|
|
|
keep the average rate less than or equal to the parameter value.
|
|
|
|
Defaults to unlimited speed.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.15.5. Available since PHP 5.4.0.
|
|
|
|
</entry>
|
2012-02-15 13:52:34 +00:00
|
|
|
</row>
|
2012-08-20 18:43:32 +00:00
|
|
|
<row>
|
2012-02-15 13:52:34 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSH_AUTH_TYPES</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
A bitmask consisting of one or more of
|
2012-08-20 18:43:32 +00:00
|
|
|
<constant>CURLSSH_AUTH_PUBLICKEY</constant>,
|
|
|
|
<constant>CURLSSH_AUTH_PASSWORD</constant>,
|
|
|
|
<constant>CURLSSH_AUTH_HOST</constant>,
|
|
|
|
<constant>CURLSSH_AUTH_KEYBOARD</constant>. Set to
|
|
|
|
<constant>CURLSSH_AUTH_ANY</constant> to let libcurl pick one.
|
2012-02-15 13:52:34 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.16.1.
|
|
|
|
</entry>
|
2011-06-30 13:10:16 +00:00
|
|
|
</row>
|
2013-10-04 16:18:41 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_IPRESOLVE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Allows an application to select what kind of IP addresses to use when
|
|
|
|
resolving host names. This is only interesting when using host names that
|
|
|
|
resolve addresses using more than one version of IP, possible values are
|
2013-10-30 06:42:59 +00:00
|
|
|
<constant>CURL_IPRESOLVE_WHATEVER</constant>,
|
|
|
|
<constant>CURL_IPRESOLVE_V4</constant>,
|
|
|
|
<constant>CURL_IPRESOLVE_V6</constant>, by default
|
|
|
|
<constant>CURL_IPRESOLVE_WHATEVER</constant>.
|
2013-10-04 16:18:41 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.10.8.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2016-04-24 03:18:10 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_FTP_FILEMETHOD</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
|
|
|
|
<constant>CURLFTPMETHOD_MULTICWD</constant>,
|
|
|
|
<constant>CURLFTPMETHOD_NOCWD</constant> and
|
|
|
|
<constant>CURLFTPMETHOD_SINGLECWD</constant>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.15.1. Available since PHP 5.3.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
2010-03-18 15:27:51 +00:00
|
|
|
<parameter>value</parameter> should be a <type>string</type> for the
|
2007-01-17 00:14:52 +00:00
|
|
|
following values of the <parameter>option</parameter> parameter:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
<entry>Notes</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_ABSTRACT_UNIX_SOCKET</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Enables the use of an abstract Unix domain socket instead of
|
|
|
|
establishing a TCP connection to a host and sets the path to
|
|
|
|
the given <type>string</type>. This option shares the same semantics
|
|
|
|
as <constant>CURLOPT_UNIX_SOCKET_PATH</constant>. These two options
|
|
|
|
share the same storage and therefore only one of them can be set
|
|
|
|
per handle.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Available since PHP 7.3.0 and cURL 7.53.0
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CAINFO</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The name of a file holding one or more certificates to verify the
|
|
|
|
peer with. This only makes sense when used in combination with
|
|
|
|
<constant>CURLOPT_SSL_VERIFYPEER</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2015-08-27 17:56:33 +00:00
|
|
|
Might require an absolute path.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CAPATH</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
A directory that holds multiple CA certificates. Use this option
|
|
|
|
alongside <constant>CURLOPT_SSL_VERIFYPEER</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_COOKIE</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-11-20 11:00:09 +00:00
|
|
|
The contents of the <literal>"Cookie: "</literal> header to be
|
2007-01-17 00:14:52 +00:00
|
|
|
used in the HTTP request.
|
2009-05-24 15:01:23 +00:00
|
|
|
Note that multiple cookies are separated with a semicolon followed
|
|
|
|
by a space (e.g., "<literal>fruit=apple; colour=red</literal>")
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_COOKIEFILE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The name of the file containing the cookie data. The cookie file can
|
|
|
|
be in Netscape format, or just plain HTTP-style headers dumped into
|
|
|
|
a file.
|
2011-12-03 04:02:28 +00:00
|
|
|
If the name is an empty string, no cookies are loaded, but cookie
|
|
|
|
handling is still enabled.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_COOKIEJAR</constant></entry>
|
|
|
|
<entry valign="top">
|
2010-09-20 11:07:17 +00:00
|
|
|
The name of a file to save all internal cookies to when the handle is closed,
|
|
|
|
e.g. after a call to curl_close.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-03-12 15:52:53 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_COOKIELIST</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular
|
|
|
|
HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store.
|
|
|
|
<literal>"ALL"</literal> erases all cookies held in memory.
|
|
|
|
<literal>"SESS"</literal> erases all session cookies held in memory.
|
|
|
|
<literal>"FLUSH"</literal> writes all known cookies to the file specified by <constant>CURLOPT_COOKIEJAR</constant>.
|
|
|
|
<literal>"RELOAD"</literal> loads all cookies from the files specified by <constant>CURLOPT_COOKIEFILE</constant>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Available since PHP 5.5.0 and cURL 7.14.1.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_CUSTOMREQUEST</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
2007-01-17 00:14:52 +00:00
|
|
|
A custom request method to use instead of
|
|
|
|
<literal>"GET"</literal> or <literal>"HEAD"</literal> when doing
|
|
|
|
a HTTP request. This is useful for doing
|
|
|
|
<literal>"DELETE"</literal> or other, more obscure HTTP requests.
|
|
|
|
Valid values are things like <literal>"GET"</literal>,
|
|
|
|
<literal>"POST"</literal>, <literal>"CONNECT"</literal> and so on;
|
|
|
|
i.e. Do not enter a whole HTTP request line here. For instance,
|
|
|
|
entering <literal>"GET /index.html HTTP/1.0\r\n\r\n"</literal>
|
|
|
|
would be incorrect.
|
|
|
|
<note>
|
|
|
|
<para>
|
2007-06-08 02:07:11 +00:00
|
|
|
Don't do this without making sure the server supports the custom
|
2007-01-17 00:14:52 +00:00
|
|
|
request method first.
|
|
|
|
</para>
|
|
|
|
</note>
|
2009-05-02 15:53:16 +00:00
|
|
|
</para></entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DEFAULT_PROTOCOL</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
|
|
|
The default protocol to use if the URL is missing a scheme name.
|
|
|
|
</para></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.45.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_INTERFACE</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
|
|
|
Set the name of the network interface that the DNS resolver should bind to.
|
|
|
|
This must be an interface name (not an address).
|
|
|
|
</para></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.33.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP4</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
|
|
|
Set the local IPv4 address that the resolver should bind to. The argument
|
|
|
|
should contain a single numerical IPv4 address as a string.
|
|
|
|
</para></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.33.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP6</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
|
|
|
Set the local IPv6 address that the resolver should bind to. The argument
|
|
|
|
should contain a single numerical IPv6 address as a string.
|
|
|
|
</para></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.33.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_EGDSOCKET</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
Like <constant>CURLOPT_RANDOM_FILE</constant>, except a filename
|
|
|
|
to an Entropy Gathering Daemon socket.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_ENCODING</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The contents of the <literal>"Accept-Encoding: "</literal> header.
|
|
|
|
This enables decoding of the response. Supported encodings are
|
|
|
|
<literal>"identity"</literal>, <literal>"deflate"</literal>, and
|
|
|
|
<literal>"gzip"</literal>. If an empty string, <literal>""</literal>,
|
|
|
|
is set, a header containing all supported encoding types is sent.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
Added in cURL 7.10.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FTPPORT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The value which will be used to get the IP address to use
|
2013-11-17 08:50:46 +00:00
|
|
|
for the FTP "PORT" instruction. The "PORT" instruction tells
|
2007-01-17 00:14:52 +00:00
|
|
|
the remote server to connect to our specified IP address. The
|
|
|
|
string may be a plain IP address, a hostname, a network
|
|
|
|
interface name (under Unix), or just a plain '-' to use the
|
|
|
|
systems default IP address.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_INTERFACE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The name of the outgoing network interface to use. This can be an
|
|
|
|
interface name, an IP address or a host name.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2012-02-15 13:52:34 +00:00
|
|
|
</row>
|
2012-08-20 18:43:32 +00:00
|
|
|
<row>
|
2012-02-15 13:52:34 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_KEYPASSWD</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The password required to use the <constant>CURLOPT_SSLKEY</constant>
|
2012-08-20 18:43:32 +00:00
|
|
|
or <constant>CURLOPT_SSH_PRIVATE_KEYFILE</constant> private key.
|
2012-02-15 13:52:34 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.16.1.
|
|
|
|
</entry>
|
2007-01-17 00:14:52 +00:00
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_KRB4LEVEL</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The KRB4 (Kerberos 4) security level. Any of the following values
|
|
|
|
(in order from least to most powerful) are valid:
|
|
|
|
<literal>"clear"</literal>,
|
|
|
|
<literal>"safe"</literal>,
|
|
|
|
<literal>"confidential"</literal>,
|
|
|
|
<literal>"private".</literal>.
|
|
|
|
If the string does not match one of these,
|
|
|
|
<literal>"private"</literal> is used. Setting this option to &null;
|
|
|
|
will disable KRB4 security. Currently KRB4 security only works
|
|
|
|
with FTP transactions.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_LOGIN_OPTIONS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Can be used to set protocol specific login options, such as the
|
|
|
|
preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
|
|
|
|
and should be used in conjunction with the
|
|
|
|
<constant>CURLOPT_USERNAME</constant> option.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.34.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PINNEDPUBLICKEY</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set the pinned public key.
|
2016-09-15 10:36:28 +00:00
|
|
|
The string can be the file name of your pinned public key. The file
|
|
|
|
format expected is "PEM" or "DER". The string can also be any
|
|
|
|
number of base64 encoded sha256 hashes preceded by "sha256//" and
|
|
|
|
separated by ";".
|
2016-07-03 16:54:52 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.39.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_POSTFIELDS</constant></entry>
|
|
|
|
<entry valign="top">
|
2010-10-23 15:05:21 +00:00
|
|
|
<simpara>
|
|
|
|
The full data to post in a HTTP "POST" operation.
|
2020-11-07 14:33:22 +00:00
|
|
|
This parameter can either be
|
2011-01-15 21:48:33 +00:00
|
|
|
passed as a urlencoded string like '<literal>para1=val1&para2=val2&...</literal>'
|
2010-10-23 15:05:21 +00:00
|
|
|
or as an array with the field name as key and field data as value.
|
|
|
|
If <parameter>value</parameter> is an array, the
|
|
|
|
<literal>Content-Type</literal> header will be set to
|
|
|
|
<literal>multipart/form-data</literal>.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
2020-11-07 14:33:22 +00:00
|
|
|
Files can be sent using <classname>CURLFile</classname>,
|
|
|
|
in which case <parameter>value</parameter> must be an array.
|
2013-05-15 21:54:04 +00:00
|
|
|
</simpara>
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-04-24 03:18:10 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PRIVATE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Any data that should be associated with this cURL handle. This data
|
|
|
|
can subsequently be retrieved with the
|
|
|
|
<constant>CURLINFO_PRIVATE</constant> option of
|
|
|
|
<function>curl_getinfo</function>. 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.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.10.3.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PRE_PROXY</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set a <type>string</type> 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
|
|
|
|
<constant>CURLOPT_PROXY</constant> option for the upcoming request.
|
|
|
|
The preproxy can only be a SOCKS proxy and it should be prefixed with
|
|
|
|
<literal>[scheme]://</literal> 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 <literal>:[port]</literal>
|
|
|
|
to the end of the host name. The proxy's port number may optionally be
|
|
|
|
specified with the separate option <constant>CURLOPT_PROXYPORT</constant>.
|
|
|
|
Defaults to using port 1080 for proxies if a port is not specified.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The HTTP proxy to tunnel requests through.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SERVICE_NAME</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The proxy authentication service name.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.34.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_CAINFO</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The path to proxy Certificate Authority (CA) bundle. Set the path as a
|
|
|
|
<type>string</type> 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 libcurl's cacert bundle is assumed
|
|
|
|
to be stored.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_CAPATH</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The directory holding multiple CA certificates to verify the HTTPS proxy with.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_CRLFILE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set 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.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_KEYPASSWD</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set the string be used as the password required to use the
|
|
|
|
<constant>CURLOPT_PROXY_SSLKEY</constant> private key. You never needed a
|
|
|
|
passphrase to load a certificate but you need one to load your private key.
|
|
|
|
This option is for connecting to an HTTPS proxy, not an HTTPS server.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_PINNEDPUBLICKEY</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Set the pinned public key for HTTPS proxy. The string can be the file name
|
|
|
|
of your pinned public key. The file format expected is "PEM" or "DER".
|
|
|
|
The string can also be any number of base64 encoded sha256 hashes preceded by
|
|
|
|
"sha256//" and separated by ";"
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERT</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The file name of your client certificate used to connect to the HTTPS proxy.
|
|
|
|
The default format is "P12" on Secure Transport and "PEM" on other engines,
|
|
|
|
and can be changed with <constant>CURLOPT_PROXY_SSLCERTTYPE</constant>.
|
|
|
|
With NSS or Secure Transport, this can also be the nickname of the certificate
|
|
|
|
you wish to authenticate with as it is named in the security database.
|
|
|
|
If you want to use a file from the current directory, please precede it with
|
|
|
|
"./" prefix, in order to avoid confusion with a nickname.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERTTYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The format of your client certificate used when connecting to an HTTPS proxy.
|
|
|
|
Supported formats are "PEM" and "DER", 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 support "P12" for
|
|
|
|
PKCS#12-encoded files. Defaults to "PEM".
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The list of ciphers to use for the connection to the HTTPS proxy.
|
|
|
|
The list must be syntactically correct, it consists of one or more cipher
|
|
|
|
strings separated by colons. Commas or spaces are also acceptable separators
|
|
|
|
but colons are normally used, !, - and + can be used as operators.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_TLS13_CIPHERS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The list of cipher suites to use for the TLS 1.3 connection to a proxy.
|
|
|
|
The list must be syntactically correct, it consists of one or more
|
|
|
|
cipher suite strings separated by colons. This option is currently used
|
|
|
|
only when curl is built to use OpenSSL 1.1.1 or later.
|
|
|
|
If you are using a different SSL backend you can try setting
|
|
|
|
TLS 1.3 cipher suites by using the <constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant> option.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEY</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The file name of your private key used for connecting to the HTTPS proxy.
|
|
|
|
The default format is "PEM" and can be changed with
|
|
|
|
<constant>CURLOPT_PROXY_SSLKEYTYPE</constant>.
|
|
|
|
(iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEYTYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The format of your private key. Supported formats are "PEM", "DER" and "ENG".
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The password to use for the TLS authentication method specified with the
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> option to also be set.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP".
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Secure Remote Password (SRP) authentication for TLS provides mutual authentication
|
|
|
|
if both sides have a shared secret. To use TLS-SRP, you must also set the
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> and
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> options.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Tusername to use for the HTTPS proxy TLS authentication method specified with the
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> option to also be set.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROXYUSERPWD</constant></entry>
|
|
|
|
<entry valign="top">
|
2009-05-02 15:53:16 +00:00
|
|
|
A username and password formatted as
|
|
|
|
<literal>"[username]:[password]"</literal> to use for the
|
|
|
|
connection to the proxy.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_RANDOM_FILE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
A filename to be used to seed the random number generator for SSL.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_RANGE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
Range(s) of data to retrieve in the format
|
|
|
|
<literal>"X-Y"</literal> where X or Y are optional. HTTP transfers
|
|
|
|
also support several intervals, separated with commas in the format
|
|
|
|
<literal>"X-Y,N-M"</literal>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_REFERER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The contents of the <literal>"Referer: "</literal> header to be used
|
|
|
|
in a HTTP request.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2012-02-15 13:52:34 +00:00
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SERVICE_NAME</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The authentication service name.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.43.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2012-08-20 18:43:32 +00:00
|
|
|
<row>
|
2012-02-15 13:52:34 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
A string containing 32 hexadecimal digits. The string should be the
|
2012-08-20 18:43:32 +00:00
|
|
|
MD5 checksum of the remote host's public key, and libcurl will reject
|
|
|
|
the connection to the host unless the md5sums match.
|
|
|
|
This option is only for SCP and SFTP transfers.
|
2012-02-15 13:52:34 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.17.1.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2012-08-20 18:43:32 +00:00
|
|
|
<row>
|
2012-02-15 13:52:34 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSH_PUBLIC_KEYFILE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The file name for your public key. If not used, libcurl defaults to
|
2012-08-20 18:43:32 +00:00
|
|
|
$HOME/.ssh/id_dsa.pub if the HOME environment variable is set,
|
|
|
|
and just "id_dsa.pub" in the current directory if HOME is not set.
|
2012-02-15 13:52:34 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.16.1.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2012-08-20 18:43:32 +00:00
|
|
|
<row>
|
2012-02-15 13:52:34 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSH_PRIVATE_KEYFILE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The file name for your private key. If not used, libcurl defaults to
|
2012-08-20 18:43:32 +00:00
|
|
|
$HOME/.ssh/id_dsa if the HOME environment variable is set,
|
|
|
|
and just "id_dsa" in the current directory if HOME is not set.
|
|
|
|
If the file is password-protected, set the password with
|
|
|
|
<constant>CURLOPT_KEYPASSWD</constant>.
|
2012-02-15 13:52:34 +00:00
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.16.1.
|
|
|
|
</entry>
|
2007-01-17 00:14:52 +00:00
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSL_CIPHER_LIST</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
A list of ciphers to use for SSL. For example,
|
|
|
|
<literal>RC4-SHA</literal> and <literal>TLSv1</literal> are valid
|
|
|
|
cipher lists.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLCERT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The name of a file containing a PEM formatted certificate.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLCERTPASSWD</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The password required to use the
|
|
|
|
<constant>CURLOPT_SSLCERT</constant> certificate.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLCERTTYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The format of the certificate. Supported formats are
|
|
|
|
<literal>"PEM"</literal> (default), <literal>"DER"</literal>,
|
|
|
|
and <literal>"ENG"</literal>.
|
2020-03-12 16:12:54 +00:00
|
|
|
As of OpenSSL 0.9.3, <literal>"P12"</literal> (for PKCS#12-encoded files)
|
|
|
|
is also supported.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.9.3.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLENGINE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The identifier for the crypto engine of the private SSL key
|
|
|
|
specified in <constant>CURLOPT_SSLKEY</constant>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLENGINE_DEFAULT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The identifier for the crypto engine used for asymmetric crypto
|
|
|
|
operations.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLKEY</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The name of a file containing a private SSL key.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLKEYPASSWD</constant></entry>
|
|
|
|
<entry valign="top"><para>
|
2007-01-17 00:14:52 +00:00
|
|
|
The secret password needed to use the private SSL key specified in
|
|
|
|
<constant>CURLOPT_SSLKEY</constant>.
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Since this option contains a sensitive password, remember to keep
|
|
|
|
the PHP script it is contained within safe.
|
|
|
|
</para>
|
|
|
|
</note>
|
2009-05-02 15:53:16 +00:00
|
|
|
</para></entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_SSLKEYTYPE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The key type of the private SSL key specified in
|
|
|
|
<constant>CURLOPT_SSLKEY</constant>. Supported key types are
|
|
|
|
<literal>"PEM"</literal> (default), <literal>"DER"</literal>,
|
|
|
|
and <literal>"ENG"</literal>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_TLS13_CIPHERS</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The list of cipher suites to use for the TLS 1.3 connection. The list must be
|
|
|
|
syntactically correct, it consists of one or more cipher suite strings separated by colons.
|
|
|
|
This option is currently used only when curl is built to use OpenSSL 1.1.1 or later.
|
|
|
|
If you are using a different SSL backend you can try setting
|
|
|
|
TLS 1.3 cipher suites by using the <constant>CURLOPT_SSL_CIPHER_LIST</constant> option.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
2020-11-25 00:58:58 +00:00
|
|
|
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
|
2020-02-05 08:54:11 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_UNIX_SOCKET_PATH</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Enables the use of Unix domain sockets as connection endpoint and
|
|
|
|
sets the path to the given <type>string</type>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.40.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_URL</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-06-08 02:07:11 +00:00
|
|
|
The URL to fetch. This can also be set when initializing a
|
2007-01-17 00:14:52 +00:00
|
|
|
session with <function>curl_init</function>.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_USERAGENT</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The contents of the <literal>"User-Agent: "</literal> header to be
|
|
|
|
used in a HTTP request.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_USERNAME</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
The user name to use in authentication.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.19.1. Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_USERPWD</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
A username and password formatted as
|
|
|
|
<literal>"[username]:[password]"</literal> to use for the
|
|
|
|
connection.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_XOAUTH2_BEARER</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Specifies the OAuth 2.0 access token.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.33.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<parameter>value</parameter> should be an array for the
|
|
|
|
following values of the <parameter>option</parameter> parameter:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
<entry>Notes</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_CONNECT_TO</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Connect to a specific host and port instead of the URL's host and port.
|
|
|
|
Accepts an array of strings with the format
|
|
|
|
<literal>HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT</literal>.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.49.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTP200ALIASES</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An array of HTTP 200 responses that will be treated as valid
|
|
|
|
responses and not as errors.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2009-03-23 21:08:01 +00:00
|
|
|
Added in cURL 7.10.3.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HTTPHEADER</constant></entry>
|
|
|
|
<entry valign="top">
|
2010-04-23 15:52:45 +00:00
|
|
|
An array of HTTP header fields to set, in the format
|
|
|
|
<code>
|
|
|
|
array('Content-type: text/plain', 'Content-length: 100')
|
|
|
|
</code>
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_POSTQUOTE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An array of FTP commands to execute on the server after the FTP
|
|
|
|
request has been performed.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_PROXYHEADER</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
An array of custom HTTP headers to pass to proxies.
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.37.0. Available since PHP 7.0.7.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_QUOTE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An array of FTP commands to execute on the server prior to the FTP
|
|
|
|
request.
|
|
|
|
</entry>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2017-07-16 18:38:13 +00:00
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_RESOLVE</constant></entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Provide a custom address for a specific host and port pair. An array
|
|
|
|
of hostname, port, and IP address strings, each element separated by
|
|
|
|
a colon. In the format:
|
|
|
|
<code>
|
|
|
|
array("example.com:80:127.0.0.1")
|
|
|
|
</code>
|
|
|
|
</entry>
|
|
|
|
<entry valign="top">
|
|
|
|
Added in cURL 7.21.3. Available since PHP 5.5.0.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
<parameter>value</parameter> should be a stream resource (using
|
|
|
|
<function>fopen</function>, for example) for the following values of the
|
|
|
|
<parameter>option</parameter> parameter:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_FILE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The file that the transfer should be written to. The default
|
|
|
|
is <literal>STDOUT</literal> (the browser window).
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_INFILE</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The file that the transfer should be read from when uploading.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_STDERR</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
An alternative location to output errors to instead of
|
|
|
|
<literal>STDERR</literal>.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_WRITEHEADER</constant></entry>
|
|
|
|
<entry valign="top">
|
2007-01-17 00:14:52 +00:00
|
|
|
The file that the header part of the transfer is written to.
|
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
2013-03-25 08:24:10 +00:00
|
|
|
<parameter>value</parameter> should be the name of a valid function or a Closure
|
|
|
|
for the following values of the <parameter>option</parameter> parameter:
|
2007-01-17 00:14:52 +00:00
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_HEADERFUNCTION</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-03-25 08:24:10 +00:00
|
|
|
A callback accepting two parameters.
|
|
|
|
The first is the cURL resource, the second is a
|
2007-06-08 02:07:11 +00:00
|
|
|
string with the header data to be written. The header data must
|
2015-04-04 04:50:37 +00:00
|
|
|
be written by this callback. Return the number of
|
2007-06-08 02:07:11 +00:00
|
|
|
bytes written.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PASSWDFUNCTION</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-03-25 08:24:10 +00:00
|
|
|
A callback accepting three parameters.
|
|
|
|
The first is the cURL resource, the second is a
|
2007-01-17 00:14:52 +00:00
|
|
|
string containing a password prompt, and the third is the maximum
|
|
|
|
password length. Return the string containing the password.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2009-11-20 10:58:58 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_PROGRESSFUNCTION</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-07-23 09:07:14 +00:00
|
|
|
<para>
|
|
|
|
A callback accepting five parameters.
|
|
|
|
The first is the cURL resource, the second is the total number of
|
|
|
|
bytes expected to be downloaded in this transfer, the third is
|
|
|
|
the number of bytes downloaded so far, the fourth is the total
|
|
|
|
number of bytes expected to be uploaded in this transfer, and the
|
|
|
|
fifth is the number of bytes uploaded so far.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The callback is only called when the <constant>CURLOPT_NOPROGRESS</constant>
|
|
|
|
option is set to &false;.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
<para>
|
|
|
|
Return a non-zero value to abort the transfer. In which case, the
|
|
|
|
transfer will set a <constant>CURLE_ABORTED_BY_CALLBACK</constant>
|
|
|
|
error.
|
|
|
|
</para>
|
2009-11-20 10:58:58 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
2007-01-17 00:14:52 +00:00
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_READFUNCTION</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-03-25 08:24:10 +00:00
|
|
|
A callback accepting three parameters.
|
|
|
|
The first is the cURL resource, the second is a
|
2011-04-11 10:39:29 +00:00
|
|
|
stream resource provided to cURL through the option
|
|
|
|
<constant>CURLOPT_INFILE</constant>, and the third is the maximum
|
2013-03-25 08:24:10 +00:00
|
|
|
amount of data to be read. The callback must return a string
|
2011-04-11 10:39:29 +00:00
|
|
|
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 signal <literal>EOF</literal>.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
<row>
|
2010-03-18 15:27:51 +00:00
|
|
|
<entry valign="top"><constant>CURLOPT_WRITEFUNCTION</constant></entry>
|
|
|
|
<entry valign="top">
|
2013-03-25 08:24:10 +00:00
|
|
|
A callback accepting two parameters.
|
|
|
|
The first is the cURL resource, and the second is a
|
|
|
|
string with the data to be written. The data must be saved by
|
|
|
|
this callback. It must return the exact number of bytes written
|
2010-08-07 20:25:50 +00:00
|
|
|
or the transfer will be aborted with an error.
|
2007-01-17 00:14:52 +00:00
|
|
|
</entry>
|
2013-07-23 09:07:14 +00:00
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Other values:
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="3">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>Option</entry>
|
|
|
|
<entry>Set <parameter>value</parameter> to</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry valign="top"><constant>CURLOPT_SHARE</constant></entry>
|
2013-06-15 21:22:46 +00:00
|
|
|
<entry valign="top">
|
2013-07-23 09:07:14 +00:00
|
|
|
A result of <function>curl_share_init</function>. Makes the cURL
|
|
|
|
handle to use the data from the shared handle.
|
2013-06-15 21:22:46 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
2007-01-17 00:14:52 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2007-01-16 20:18:05 +00:00
|
|
|
</para>
|
2007-01-17 00:14:52 +00:00
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2007-01-17 00:14:52 +00:00
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
2007-01-16 20:18:05 +00:00
|
|
|
<para>
|
2007-01-17 00:14:52 +00:00
|
|
|
&return.success;
|
2007-01-16 20:18:05 +00:00
|
|
|
</para>
|
2007-01-17 00:14:52 +00:00
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2009-03-23 21:08:01 +00:00
|
|
|
<refsect1 role="changelog">
|
|
|
|
&reftitle.changelog;
|
|
|
|
<para>
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="2">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>&Version;</entry>
|
|
|
|
<entry>&Description;</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-11-25 00:58:58 +00:00
|
|
|
&curl.changelog.handle-param;
|
2020-01-26 13:42:43 +00:00
|
|
|
<row>
|
|
|
|
<entry>7.3.15, 7.4.3</entry>
|
|
|
|
<entry>
|
|
|
|
Introduced <constant>CURLOPT_HTTP09_ALLOWED </constant>.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2020-02-05 08:54:11 +00:00
|
|
|
<row>
|
|
|
|
<entry>7.3.0</entry>
|
|
|
|
<entry>
|
|
|
|
Introduced <constant>CURLOPT_ABSTRACT_UNIX_SOCKET</constant>, <constant>CURLOPT_KEEP_SENDING_ON_ERROR</constant>,
|
|
|
|
<constant>CURLOPT_PRE_PROXY</constant>, <constant>CURLOPT_PROXY_CAINFO</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_CAPATH</constant>, <constant>CURLOPT_PROXY_CRLFILE</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_KEYPASSWD</constant>, <constant>CURLOPT_PROXY_PINNEDPUBLICKEY</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_SSLCERT</constant>, <constant>CURLOPT_PROXY_SSLCERTTYPE</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant>, <constant>CURLOPT_PROXY_SSLKEY</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_SSLKEYTYPE</constant>, <constant>CURLOPT_PROXY_SSL_OPTIONS</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_SSL_VERIFYHOST</constant>, <constant>CURLOPT_PROXY_SSL_VERIFYPEER</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_SSLVERSION</constant>, <constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant>, <constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant>,
|
|
|
|
<constant>CURLOPT_SOCKS5_AUTH</constant>, <constant>CURLOPT_SUPPRESS_CONNECT_HEADERS</constant>,
|
|
|
|
<constant>CURLOPT_DISALLOW_USERNAME_IN_URL</constant>, <constant>CURLOPT_DNS_SHUFFLE_ADDRESSES</constant>,
|
|
|
|
<constant>CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS</constant>, <constant>CURLOPT_HAPROXYPROTOCOL</constant>,
|
|
|
|
<constant>CURLOPT_PROXY_TLS13_CIPHERS</constant>, <constant>CURLOPT_SSH_COMPRESSION</constant>,
|
|
|
|
<constant>CURLOPT_TIMEVALUE_LARGE</constant> and <constant>CURLOPT_TLS13_CIPHERS</constant>.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2016-07-03 16:54:52 +00:00
|
|
|
<row>
|
|
|
|
<entry>7.0.7</entry>
|
|
|
|
<entry>
|
|
|
|
Introduced <constant>CURL_HTTP_VERSION_2</constant>, <constant>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</constant>,
|
|
|
|
<constant>CURL_HTTP_VERSION_2TLS</constant>, <constant>CURL_REDIR_POST_301</constant>,
|
|
|
|
<constant>CURL_REDIR_POST_302</constant>, <constant>CURL_REDIR_POST_303</constant>,
|
|
|
|
<constant>CURL_REDIR_POST_ALL</constant>, <constant>CURL_VERSION_KERBEROS5</constant>,
|
|
|
|
<constant>CURL_VERSION_PSL</constant>, <constant>CURL_VERSION_UNIX_SOCKETS</constant>,
|
|
|
|
<constant>CURLAUTH_NEGOTIATE</constant>, <constant>CURLAUTH_NTLM_WB</constant>,
|
|
|
|
<constant>CURLFTP_CREATE_DIR</constant>, <constant>CURLFTP_CREATE_DIR_NONE</constant>,
|
|
|
|
<constant>CURLFTP_CREATE_DIR_RETRY</constant>, <constant>CURLHEADER_SEPARATE</constant>,
|
|
|
|
<constant>CURLHEADER_UNIFIED</constant>, <constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant>,
|
|
|
|
<constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant>, <constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant>,
|
|
|
|
<constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant>, <constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant>,
|
|
|
|
<constant>CURLOPT_CONNECT_TO</constant>, <constant>CURLOPT_DEFAULT_PROTOCOL</constant>,
|
|
|
|
<constant>CURLOPT_DNS_INTERFACE</constant>, <constant>CURLOPT_DNS_LOCAL_IP4</constant>,
|
|
|
|
<constant>CURLOPT_DNS_LOCAL_IP6</constant>, <constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant>,
|
|
|
|
<constant>CURLOPT_HEADEROPT</constant>, <constant>CURLOPT_LOGIN_OPTIONS</constant>,
|
|
|
|
<constant>CURLOPT_PATH_AS_IS</constant>, <constant>CURLOPT_PINNEDPUBLICKEY</constant>,
|
|
|
|
<constant>CURLOPT_PIPEWAIT</constant>, <constant>CURLOPT_PROXY_SERVICE_NAME</constant>,
|
|
|
|
<constant>CURLOPT_PROXYHEADER</constant>, <constant>CURLOPT_SASL_IR</constant>,
|
|
|
|
<constant>CURLOPT_SERVICE_NAME</constant>, <constant>CURLOPT_SSL_ENABLE_ALPN</constant>,
|
|
|
|
<constant>CURLOPT_SSL_ENABLE_NPN</constant>, <constant>CURLOPT_SSL_FALSESTART</constant>,
|
|
|
|
<constant>CURLOPT_SSL_VERIFYSTATUS</constant>, <constant>CURLOPT_STREAM_WEIGHT</constant>,
|
|
|
|
<constant>CURLOPT_TCP_FASTOPEN</constant>, <constant>CURLOPT_TFTP_NO_OPTIONS</constant>,
|
|
|
|
<constant>CURLOPT_UNIX_SOCKET_PATH</constant>, <constant>CURLOPT_XOAUTH2_BEARER</constant>,
|
|
|
|
<constant>CURLPROTO_SMB</constant>, <constant>CURLPROTO_SMBS</constant>,
|
|
|
|
<constant>CURLPROXY_HTTP_1_0</constant>, <constant>CURLSSH_AUTH_AGENT</constant> and
|
|
|
|
<constant>CURLSSLOPT_NO_REVOKE</constant>.
|
|
|
|
</entry>
|
|
|
|
</row>
|
2009-03-23 21:08:01 +00:00
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-01-17 00:14:52 +00:00
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-01-16 20:18:05 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
2008-03-30 17:04:01 +00:00
|
|
|
<title>Initializing a new cURL session and fetching a web page</title>
|
2007-01-16 20:18:05 +00:00
|
|
|
<programlisting role="php">
|
2004-02-27 05:38:35 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
2007-01-17 00:14:52 +00:00
|
|
|
// create a new cURL resource
|
2004-02-27 05:38:35 +00:00
|
|
|
$ch = curl_init();
|
|
|
|
|
|
|
|
// set URL and other appropriate options
|
|
|
|
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
|
2004-08-19 03:24:29 +00:00
|
|
|
curl_setopt($ch, CURLOPT_HEADER, false);
|
2004-02-27 05:38:35 +00:00
|
|
|
|
|
|
|
// grab URL and pass it to the browser
|
|
|
|
curl_exec($ch);
|
|
|
|
|
2007-01-17 00:14:52 +00:00
|
|
|
// close cURL resource, and free up system resources
|
2004-02-27 05:38:35 +00:00
|
|
|
curl_close($ch);
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-16 20:18:05 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
2008-03-30 17:04:01 +00:00
|
|
|
</para>
|
2007-01-16 20:18:05 +00:00
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2009-04-27 15:21:00 +00:00
|
|
|
<refsect1 role="notes">
|
|
|
|
&reftitle.notes;
|
|
|
|
<note>
|
|
|
|
<para>
|
2009-05-02 13:40:14 +00:00
|
|
|
Passing an array to <constant>CURLOPT_POSTFIELDS</constant> will
|
2009-04-27 23:07:24 +00:00
|
|
|
encode the data as <emphasis>multipart/form-data</emphasis>,
|
2009-04-27 15:21:00 +00:00
|
|
|
while passing a URL-encoded string will encode the data as
|
|
|
|
<emphasis>application/x-www-form-urlencoded</emphasis>.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2007-01-17 00:14:52 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>curl_setopt_array</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2009-05-02 15:53:16 +00:00
|
|
|
|
2007-01-16 20:18:05 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|