reference/curl/functions/curl-setopt.xml
61374bbe228e8e9c55a24aba59a1e2bb2a871148
...
...
@@ -10,7 +10,7 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>curl_setopt</methodname>
13
-
<methodparam><type>resource</type><parameter>ch</parameter></methodparam>
13
+
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
14
14
<methodparam><type>int</type><parameter>option</parameter></methodparam>
15
15
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
16
16
</methodsynopsis>
...
...
@@ -61,18 +61,6 @@
61
61
</entry>
62
62
</row>
63
63
<row>
64
-
<entry valign="top"><constant>CURLOPT_BINARYTRANSFER</constant></entry>
65
-
<entry valign="top">
66
-
&true; to return the raw output when
67
-
<constant>CURLOPT_RETURNTRANSFER</constant> is used.
68
-
</entry>
69
-
<entry valign="top">
70
-
From PHP 5.1.3, this option has no effect: the raw output will
71
-
always be returned when
72
-
<constant>CURLOPT_RETURNTRANSFER</constant> is used.
73
-
</entry>
74
-
</row>
75
-
<row>
76
64
<entry valign="top"><constant>CURLOPT_COOKIESESSION</constant></entry>
77
65
<entry valign="top">
78
66
&true; to mark this as a new cookie "session". It will force libcurl
...
...
@@ -88,12 +76,11 @@
88
76
<row>
89
77
<entry valign="top"><constant>CURLOPT_CERTINFO</constant></entry>
90
78
<entry valign="top">
91
-
&true; to output SSL certification information to <literal>STDERR</literal>
79
+
&true; to output SSL certification information to <constant>STDERR</constant>
92
80
on secure transfers.
93
81
</entry>
94
82
<entry valign="top">
95
83
Added in cURL 7.19.1.
96
-
Available since PHP 5.3.2.
97
84
Requires <constant>CURLOPT_VERBOSE</constant> to be on to have an effect.
98
85
</entry>
99
86
</row>
...
...
@@ -106,7 +93,6 @@
106
93
</entry>
107
94
<entry valign="top">
108
95
Added in 7.15.2.
109
-
Available since PHP 5.5.0.
110
96
</entry>
111
97
</row>
112
98
<row>
...
...
@@ -119,10 +105,51 @@
119
105
</entry>
120
106
</row>
121
107
<row>
108
+
<entry valign="top"><constant>CURLOPT_DISALLOW_USERNAME_IN_URL</constant></entry>
109
+
<entry valign="top">
110
+
&true; to not allow URLs that include a username. Usernames are allowed by default (0).
111
+
</entry>
112
+
<entry valign="top">
113
+
Added in cURL 7.61.0. Available since PHP 7.3.0.
114
+
</entry>
115
+
</row>
116
+
<row>
117
+
<entry valign="top"><constant>CURLOPT_DNS_SHUFFLE_ADDRESSES</constant></entry>
118
+
<entry valign="top">
119
+
&true; to shuffle the order of all returned addresses so that they will be used
120
+
in a random order, when a name is resolved and more than one IP address is returned.
121
+
This may cause IPv4 to be used before IPv6 or vice versa.
122
+
</entry>
123
+
<entry valign="top">
124
+
Added in cURL 7.60.0. Available since PHP 7.3.0.
125
+
</entry>
126
+
</row>
127
+
<row>
128
+
<entry valign="top"><constant>CURLOPT_HAPROXYPROTOCOL</constant></entry>
129
+
<entry valign="top">
130
+
&true; to send an HAProxy PROXY protocol v1 header at the start of the connection.
131
+
The default action is not to send this header.
132
+
</entry>
133
+
<entry valign="top">
134
+
Added in cURL 7.60.0. Available since PHP 7.3.0.
135
+
</entry>
136
+
</row>
137
+
<row>
138
+
<entry valign="top"><constant>CURLOPT_SSH_COMPRESSION</constant></entry>
139
+
<entry valign="top">
140
+
&true; to enable built-in SSH compression. This is a request, not an order;
141
+
the server may or may not do it.
142
+
</entry>
143
+
<entry valign="top">
144
+
Added in cURL 7.56.0. Available since PHP 7.3.0.
145
+
</entry>
146
+
</row>
147
+
<row>
122
148
<entry valign="top"><constant>CURLOPT_DNS_USE_GLOBAL_CACHE</constant></entry>
123
149
<entry valign="top">
124
-
&true; to use a global DNS cache. This option is
125
-
not thread-safe and is enabled by default.
150
+
&true; to use a global DNS cache. This option is not thread-safe.
151
+
It is conditionally enabled by default if PHP is built for non-threaded use
152
+
(CLI, FCGI, Apache2-Prefork, etc.).
126
153
</entry>
127
154
<entry valign="top">
128
155
</entry>
...
...
@@ -138,11 +165,20 @@
138
165
</entry>
139
166
</row>
140
167
<row>
168
+
<entry valign="top"><constant>CURLOPT_SSL_FALSESTART</constant></entry>
169
+
<entry valign="top">
170
+
&true; to enable TLS false start.
171
+
</entry>
172
+
<entry valign="top">
173
+
Added in cURL 7.42.0. Available since PHP 7.0.7.
174
+
</entry>
175
+
</row>
176
+
<row>
141
177
<entry valign="top"><constant>CURLOPT_FILETIME</constant></entry>
142
178
<entry valign="top">
143
179
&true; to attempt to retrieve the modification
144
180
date of the remote document. This value can be retrieved using
145
-
the <parameter>CURLINFO_FILETIME</parameter> option with
181
+
the <constant>CURLINFO_FILETIME</constant> option with
146
182
<function>curl_getinfo</function>.
147
183
</entry>
148
184
<entry valign="top">
...
...
@@ -153,9 +189,8 @@
153
189
<entry valign="top">
154
190
&true; to follow any
155
191
<literal>"Location: "</literal> header that the server sends as
156
-
part of the HTTP header (note this is recursive, PHP will follow as
157
-
many <literal>"Location: "</literal> headers that it is sent,
158
-
unless <constant>CURLOPT_MAXREDIRS</constant> is set).
192
+
part of the HTTP header.
193
+
See also <constant>CURLOPT_MAXREDIRS</constant>.
159
194
</entry>
160
195
<entry valign="top">
161
196
</entry>
...
...
@@ -223,7 +258,7 @@
223
258
the number of small packets on the network.
224
259
</entry>
225
260
<entry valign="top">
226
-
Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or
261
+
Available for versions compiled with libcurl 7.11.2 or
227
262
greater.
228
263
</entry>
229
264
</row>
...
...
@@ -259,11 +294,21 @@
259
294
&true; to track the handle's request string.
260
295
</entry>
261
296
<entry valign="top">
262
-
Available since PHP 5.1.3. The <constant>CURLINFO_</constant>
297
+
The <constant>CURLINFO_</constant>
263
298
prefix is intentional.
264
299
</entry>
265
300
</row>
266
301
<row>
302
+
<entry valign="top"><constant>CURLOPT_HTTP09_ALLOWED</constant></entry>
303
+
<entry valign="top">
304
+
Whether to allow HTTP/0.9 responses. Defaults to &false; as of libcurl 7.66.0;
305
+
formerly it defaulted to &true;.
306
+
</entry>
307
+
<entry valign="top">
308
+
Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl &gt;= 7.64.0
309
+
</entry>
310
+
</row>
311
+
<row>
267
312
<entry valign="top"><constant>CURLOPT_HTTPGET</constant></entry>
268
313
<entry valign="top">
269
314
&true; to reset the HTTP request method to GET.
...
...
@@ -282,6 +327,27 @@
282
327
</entry>
283
328
</row>
284
329
<row>
330
+
<entry valign="top"><constant>CURLOPT_HTTP_CONTENT_DECODING</constant></entry>
331
+
<entry valign="top">
332
+
&false; to get the raw HTTP response body.
333
+
</entry>
334
+
<entry valign="top">
335
+
Available if built against libcurl &gt;= 7.16.2.
336
+
</entry>
337
+
</row>
338
+
<row>
339
+
<entry valign="top"><constant>CURLOPT_KEEP_SENDING_ON_ERROR</constant></entry>
340
+
<entry valign="top">
341
+
&true; to keep sending the request body if the HTTP code returned is
342
+
equal to or larger than 300. The default action would be to stop sending
343
+
and close the stream or connection. Suitable for manual NTLM authentication.
344
+
Most applications do not need this option.
345
+
</entry>
346
+
<entry valign="top">
347
+
Available as of PHP 7.3.0 if built against libcurl &gt;= 7.51.0.
348
+
</entry>
349
+
</row>
350
+
<row>
285
351
<entry valign="top"><constant>CURLOPT_MUTE</constant></entry>
286
352
<entry valign="top">
287
353
&true; to be completely silent with regards to
...
...
@@ -337,6 +403,24 @@
337
403
</entry>
338
404
</row>
339
405
<row>
406
+
<entry valign="top"><constant>CURLOPT_PATH_AS_IS</constant></entry>
407
+
<entry valign="top">
408
+
&true; to not handle dot dot sequences.
409
+
</entry>
410
+
<entry valign="top">
411
+
Added in cURL 7.42.0. Available since PHP 7.0.7.
412
+
</entry>
413
+
</row>
414
+
<row>
415
+
<entry valign="top"><constant>CURLOPT_PIPEWAIT</constant></entry>
416
+
<entry valign="top">
417
+
&true; to wait for pipelining/multiplexing.
418
+
</entry>
419
+
<entry valign="top">
420
+
Added in cURL 7.43.0. Available since PHP 7.0.7.
421
+
</entry>
422
+
</row>
423
+
<row>
340
424
<entry valign="top"><constant>CURLOPT_POST</constant></entry>
341
425
<entry valign="top">
342
426
&true; to do a regular HTTP POST. This POST is the
...
...
@@ -361,23 +445,40 @@
361
445
<entry valign="top">
362
446
&true; to return the transfer as a string of the
363
447
return value of <function>curl_exec</function> instead of outputting
364
-
it out directly.
448
+
it directly.
365
449
</entry>
366
450
<entry valign="top">
367
451
</entry>
368
452
</row>
369
453
<row>
370
-
<entry valign="top"><constant>CURLOPT_SAFE_UPLOAD</constant></entry>
454
+
<entry valign="top"><constant>CURLOPT_SASL_IR</constant></entry>
371
455
<entry valign="top">
372
-
&true; to disable support for the <literal>@</literal> prefix for
373
-
uploading files in <constant>CURLOPT_POSTFIELDS</constant>, which
374
-
means that values starting with <literal>@</literal> can be safely
375
-
passed as fields. <classname>CURLFile</classname> may be used for
376
-
uploads instead.
456
+
&true; to enable sending the initial response in the first packet.
457
+
</entry>
458
+
<entry valign="top">
459
+
Added in cURL 7.31.10. Available since PHP 7.0.7.
460
+
</entry>
461
+
</row>
462
+
<row>
463
+
<entry valign="top"><constant>CURLOPT_SSL_ENABLE_ALPN</constant></entry>
464
+
<entry valign="top">
465
+
&false; to disable ALPN in the SSL handshake (if the SSL backend
466
+
libcurl is built to use supports it), which can be used to
467
+
negotiate http2.
468
+
</entry>
469
+
<entry valign="top">
470
+
Added in cURL 7.36.0. Available since PHP 7.0.7.
471
+
</entry>
472
+
</row>
473
+
<row>
474
+
<entry valign="top"><constant>CURLOPT_SSL_ENABLE_NPN</constant></entry>
475
+
<entry valign="top">
476
+
&false; to disable NPN in the SSL handshake (if the SSL backend
477
+
libcurl is built to use supports it), which can be used to
478
+
negotiate http2.
377
479
</entry>
378
480
<entry valign="top">
379
-
Added in PHP 5.5.0 with &false; as the default value. PHP 5.6.0
380
-
changes the default value to &true;.
481
+
Added in cURL 7.36.0. Available since PHP 7.0.7.
381
482
</entry>
382
483
</row>
383
484
<row>
...
...
@@ -395,11 +496,75 @@
395
496
</entry>
396
497
</row>
397
498
<row>
499
+
<entry valign="top"><constant>CURLOPT_SSL_VERIFYSTATUS</constant></entry>
500
+
<entry valign="top">
501
+
&true; to verify the certificate's status.
502
+
</entry>
503
+
<entry valign="top">
504
+
Added in cURL 7.41.0. Available since PHP 7.0.7.
505
+
</entry>
506
+
</row>
507
+
<row>
508
+
<entry valign="top"><constant>CURLOPT_PROXY_SSL_VERIFYPEER</constant></entry>
509
+
<entry valign="top">
510
+
&false; to stop cURL from verifying the peer's certificate.
511
+
Alternate certificates to verify against can be
512
+
specified with the <constant>CURLOPT_CAINFO</constant> option
513
+
or a certificate directory can be specified with the
514
+
<constant>CURLOPT_CAPATH</constant> option.
515
+
When set to false, the peer certificate verification succeeds regardless.
516
+
</entry>
517
+
<entry valign="top">
518
+
&true; by default. Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
519
+
</entry>
520
+
</row>
521
+
<row>
522
+
<entry valign="top"><constant>CURLOPT_SAFE_UPLOAD</constant></entry>
523
+
<entry valign="top">
524
+
Always &true;, what disables support for the <literal>@</literal> prefix for
525
+
uploading files in <constant>CURLOPT_POSTFIELDS</constant>, which
526
+
means that values starting with <literal>@</literal> can be safely
527
+
passed as fields. <classname>CURLFile</classname> may be used for
528
+
uploads instead.
529
+
</entry>
530
+
<entry valign="top">
531
+
</entry>
532
+
</row>
533
+
<row>
534
+
<entry valign="top"><constant>CURLOPT_SUPPRESS_CONNECT_HEADERS</constant></entry>
535
+
<entry valign="top">
536
+
&true; to suppress proxy CONNECT response headers from the user callback functions
537
+
<constant>CURLOPT_HEADERFUNCTION</constant> and <constant>CURLOPT_WRITEFUNCTION</constant>,
538
+
when <constant>CURLOPT_HTTPPROXYTUNNEL</constant> is used and a CONNECT request is made.
539
+
</entry>
540
+
<entry valign="top">
541
+
Added in cURL 7.54.0. Available since PHP 7.3.0.
542
+
</entry>
543
+
</row>
544
+
<row>
545
+
<entry valign="top"><constant>CURLOPT_TCP_FASTOPEN</constant></entry>
546
+
<entry valign="top">
547
+
&true; to enable TCP Fast Open.
548
+
</entry>
549
+
<entry valign="top">
550
+
Added in cURL 7.49.0. Available since PHP 7.0.7.
551
+
</entry>
552
+
</row>
553
+
<row>
554
+
<entry valign="top"><constant>CURLOPT_TFTP_NO_OPTIONS</constant></entry>
555
+
<entry valign="top">
556
+
&true; to not send TFTP options requests.
557
+
</entry>
558
+
<entry valign="top">
559
+
Added in cURL 7.48.0. Available since PHP 7.0.7.
560
+
</entry>
561
+
</row>
562
+
<row>
398
563
<entry valign="top"><constant>CURLOPT_TRANSFERTEXT</constant></entry>
399
564
<entry valign="top">
400
565
&true; to use ASCII mode for FTP transfers.
401
566
For LDAP, it retrieves data in plain text instead of HTML. On
402
-
Windows systems, it will not set <literal>STDOUT</literal> to binary
567
+
Windows systems, it will not set <constant>STDOUT</constant> to binary
403
568
mode.
404
569
</entry>
405
570
<entry valign="top">
...
...
@@ -428,7 +593,7 @@
428
593
<entry valign="top"><constant>CURLOPT_VERBOSE</constant></entry>
429
594
<entry valign="top">
430
595
&true; to output verbose information. Writes
431
-
output to <literal>STDERR</literal>, or the file specified using
596
+
output to <constant>STDERR</constant>, or the file specified using
432
597
<constant>CURLOPT_STDERR</constant>.
433
598
</entry>
434
599
<entry valign="top">
...
...
@@ -439,7 +604,7 @@
439
604
</informaltable>
440
605
</para>
441
606
<para>
442
-
<parameter>value</parameter> should be an <type>integer</type> for the
607
+
<parameter>value</parameter> should be an <type>int</type> for the
443
608
following values of the <parameter>option</parameter> parameter:
444
609
<informaltable>
445
610
<tgroup cols="3">
...
...
@@ -462,21 +627,6 @@
462
627
</entry>
463
628
</row>
464
629
<row>
465
-
<entry valign="top"><constant>CURLOPT_CLOSEPOLICY</constant></entry>
466
-
<entry valign="top">
467
-
One of the <constant>CURLCLOSEPOLICY_*</constant> values.
468
-
<note>
469
-
<para>
470
-
This option is deprecated, as it was never implemented in cURL and
471
-
never had any effect.
472
-
</para>
473
-
</note>
474
-
</entry>
475
-
<entry valign="top">
476
-
Removed in PHP 5.6.0.
477
-
</entry>
478
-
</row>
479
-
<row>
480
630
<entry><constant>CURLOPT_CONNECTTIMEOUT</constant></entry>
481
631
<entry valign="top">
482
632
The number of seconds to wait while trying to connect. Use 0 to
...
...
@@ -496,7 +646,7 @@
496
646
timeouts with a minimum timeout allowed of one second.
497
647
</entry>
498
648
<entry valign="top">
499
-
Added in cURL 7.16.2. Available since PHP 5.2.3.
649
+
Added in cURL 7.16.2.
500
650
</entry>
501
651
</row>
502
652
<row>
...
...
@@ -509,24 +659,80 @@
509
659
</entry>
510
660
</row>
511
661
<row>
662
+
<entry valign="top"><constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant></entry>
663
+
<entry valign="top">
664
+
The timeout for <literal>Expect: 100-continue</literal> responses in milliseconds.
665
+
Defaults to 1000 milliseconds.
666
+
</entry>
667
+
<entry valign="top">
668
+
Added in cURL 7.36.0. Available since PHP 7.0.7.
669
+
</entry>
670
+
</row>
671
+
<row>
672
+
<entry valign="top"><constant>CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS</constant></entry>
673
+
<entry valign="top">
674
+
Head start for ipv6 for the happy eyeballs algorithm. Happy eyeballs attempts
675
+
to connect to both IPv4 and IPv6 addresses for dual-stack hosts,
676
+
preferring IPv6 first for timeout milliseconds.
677
+
Defaults to CURL_HET_DEFAULT, which is currently 200 milliseconds.
678
+
</entry>
679
+
<entry valign="top">
680
+
Added in cURL 7.59.0. Available since PHP 7.3.0.
681
+
</entry>
682
+
</row>
683
+
<row>
512
684
<entry valign="top"><constant>CURLOPT_FTPSSLAUTH</constant></entry>
513
685
<entry valign="top">
514
686
The FTP authentication method (when is activated):
515
-
<literal>CURLFTPAUTH_SSL</literal> (try SSL first),
516
-
<literal>CURLFTPAUTH_TLS</literal> (try TLS first), or
517
-
<literal>CURLFTPAUTH_DEFAULT</literal> (let cURL decide).
687
+
<constant>CURLFTPAUTH_SSL</constant> (try SSL first),
688
+
<constant>CURLFTPAUTH_TLS</constant> (try TLS first), or
689
+
<constant>CURLFTPAUTH_DEFAULT</constant> (let cURL decide).
518
690
</entry>
519
691
<entry valign="top">
520
692
Added in cURL 7.12.2.
521
693
</entry>
522
694
</row>
523
695
<row>
696
+
<entry valign="top"><constant>CURLOPT_HEADEROPT</constant></entry>
697
+
<entry valign="top">
698
+
How to deal with headers. One of the following constants:
699
+
<simpara>
700
+
<constant>CURLHEADER_UNIFIED</constant>: the headers specified in
701
+
<constant>CURLOPT_HTTPHEADER</constant> will be used in requests
702
+
both to servers and proxies. With this option enabled,
703
+
<constant>CURLOPT_PROXYHEADER</constant> will not have any effect.
704
+
</simpara>
705
+
<simpara>
706
+
<constant>CURLHEADER_SEPARATE</constant>: makes
707
+
<constant>CURLOPT_HTTPHEADER</constant> headers only get sent to
708
+
a server and not to a proxy. Proxy headers must be set with
709
+
<constant>CURLOPT_PROXYHEADER</constant> to get used. Note that if
710
+
a non-CONNECT request is sent to a proxy, libcurl will send both
711
+
server headers and proxy headers. When doing CONNECT, libcurl will
712
+
send <constant>CURLOPT_PROXYHEADER</constant> headers only to the
713
+
proxy and then <constant>CURLOPT_HTTPHEADER</constant> headers
714
+
only to the server.
715
+
</simpara>
716
+
<simpara>
717
+
Defaults to <constant>CURLHEADER_SEPARATE</constant> as of cURL
718
+
7.42.1, and <constant>CURLHEADER_UNIFIED</constant> before.
719
+
</simpara>
720
+
</entry>
721
+
<entry valign="top">
722
+
Added in cURL 7.37.0. Available since PHP 7.0.7.
723
+
</entry>
724
+
</row>
725
+
<row>
524
726
<entry valign="top"><constant>CURLOPT_HTTP_VERSION</constant></entry>
525
727
<entry valign="top">
526
-
<parameter>CURL_HTTP_VERSION_NONE</parameter> (default, lets CURL
728
+
<constant>CURL_HTTP_VERSION_NONE</constant> (default, lets CURL
527
729
decide which version to use),
528
-
<parameter>CURL_HTTP_VERSION_1_0</parameter> (forces HTTP/1.0),
529
-
or <parameter>CURL_HTTP_VERSION_1_1</parameter> (forces HTTP/1.1).
730
+
<constant>CURL_HTTP_VERSION_1_0</constant> (forces HTTP/1.0),
731
+
<constant>CURL_HTTP_VERSION_1_1</constant> (forces HTTP/1.1),
732
+
<constant>CURL_HTTP_VERSION_2_0</constant> (attempts HTTP 2),
733
+
<constant>CURL_HTTP_VERSION_2</constant> (alias of <constant>CURL_HTTP_VERSION_2_0</constant>),
734
+
<constant>CURL_HTTP_VERSION_2TLS</constant> (attempts HTTP 2 over TLS (HTTPS) only) or
735
+
<constant>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</constant> (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade).
530
736
</entry>
531
737
<entry valign="top">
532
738
</entry>
...
...
@@ -536,12 +742,13 @@
536
742
<entry valign="top">
537
743
<para>
538
744
The HTTP authentication method(s) to use. The options are:
539
-
<parameter>CURLAUTH_BASIC</parameter>,
540
-
<parameter>CURLAUTH_DIGEST</parameter>,
541
-
<parameter>CURLAUTH_GSSNEGOTIATE</parameter>,
542
-
<parameter>CURLAUTH_NTLM</parameter>,
543
-
<parameter>CURLAUTH_ANY</parameter>, and
544
-
<parameter>CURLAUTH_ANYSAFE</parameter>.
745
+
<constant>CURLAUTH_BASIC</constant>,
746
+
<constant>CURLAUTH_DIGEST</constant>,
747
+
<constant>CURLAUTH_GSSNEGOTIATE</constant>,
748
+
<constant>CURLAUTH_NTLM</constant>,
749
+
<constant>CURLAUTH_AWS_SIGV4</constant>,
750
+
<constant>CURLAUTH_ANY</constant>, and
751
+
<constant>CURLAUTH_ANYSAFE</constant>.
545
752
</para>
546
753
<para>
547
754
The bitwise <literal>|</literal> (or) operator can be used to combine
...
...
@@ -549,12 +756,12 @@
549
756
what methods it supports and pick the best one.
550
757
</para>
551
758
<para>
552
-
<parameter>CURLAUTH_ANY</parameter> is an alias for
553
-
<literal>CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
759
+
<constant>CURLAUTH_ANY</constant> sets all bits. cURL will automatically select
760
+
the one it finds most secure.
554
761
</para>
555
762
<para>
556
-
<parameter>CURLAUTH_ANYSAFE</parameter> is an alias for
557
-
<literal>CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
763
+
<constant>CURLAUTH_ANYSAFE</constant> sets all bits except <constant>CURLAUTH_BASIC</constant>.
764
+
cURL will automatically select the one it finds most secure.
558
765
</para>
559
766
</entry>
560
767
<entry valign="top">
...
...
@@ -592,12 +799,56 @@
592
799
</entry>
593
800
</row>
594
801
<row>
802
+
<entry valign="top"><constant>CURLOPT_MAIL_RCPT_ALLLOWFAILS</constant></entry>
803
+
<entry valign="top">
804
+
Allow RCPT TO command to fail for some recipients.
805
+
</entry>
806
+
<entry valign="top">
807
+
When sending data to multiple recipients, by default cURL will abort SMTP conversation if at least one of
808
+
the recipients causes RCPT TO command to return an error. This option tells cURL to ignore errors and
809
+
proceed with the remaining valid recipients. If all recipients trigger RCPT TO failures and this flag is
810
+
set, cURL will abort the SMTP conversation and return the error received from the last RCPT TO command.
811
+
</entry>
812
+
<entry valign="top">
813
+
</entry>
814
+
</row>
815
+
<row>
816
+
<entry valign="top"><constant>CURLOPT_MAXAGE_CONN</constant></entry>
817
+
<entry valign="top">
818
+
The maximum idle time allowed for an existing connection to be considered for reuse.
819
+
Default maximum age is set to <literal>118</literal> seconds.
820
+
</entry>
821
+
<entry valign="top">
822
+
</entry>
823
+
</row>
824
+
<row>
825
+
<entry valign="top"><constant>CURLOPT_MAXFILESIZE_LARGE</constant></entry>
826
+
<entry valign="top">
827
+
The maximum file size in bytes allowed to download. If the file requested is found larger than this value,
828
+
the transfer will not start and <constant>CURLE_FILESIZE_EXCEEDED</constant> will be returned.
829
+
The file size is not always known prior to download, and for such files this option has no effect even if
830
+
the file transfer ends up being larger than this given limit.
831
+
</entry>
832
+
<entry valign="top">
833
+
</entry>
834
+
</row>
835
+
<row>
836
+
<entry valign="top"><constant>CURLOPT_MAXLIFETIME_CONN</constant></entry>
837
+
<entry valign="top">
838
+
The maximum time in seconds, since the creation of the connection, that is allowed for an existing
839
+
connection to have for it to be considered for reuse. If a connection is found in the cache that is older
840
+
than this value, it will instead be closed once any in-progress transfers are complete.
841
+
Default is 0 seconds, meaning the option is disabled and all connections are eligible for reuse.
842
+
</entry>
843
+
<entry valign="top">
844
+
</entry>
845
+
</row>
846
+
<row>
595
847
<entry valign="top"><constant>CURLOPT_MAXCONNECTS</constant></entry>
596
848
<entry valign="top">
597
849
The maximum amount of persistent connections that are allowed.
598
-
When the limit is reached,
599
-
<constant>CURLOPT_CLOSEPOLICY</constant> is used to determine
600
-
which connection to close.
850
+
When the limit is reached, the oldest one in the cache is closed
851
+
to prevent increasing the number of open connections.
601
852
</entry>
602
853
<entry valign="top">
603
854
</entry>
...
...
@@ -607,6 +858,9 @@
607
858
<entry valign="top">
608
859
The maximum amount of HTTP redirections to follow. Use this option
609
860
alongside <constant>CURLOPT_FOLLOWLOCATION</constant>.
861
+
Default value of <literal>20</literal> is set to prevent infinite redirects.
862
+
Setting to <literal>-1</literal> allows inifinite redirects, and <literal>0</literal>
863
+
refuses all redirects.
610
864
</entry>
611
865
<entry valign="top">
612
866
</entry>
...
...
@@ -628,7 +882,7 @@
628
882
specific type of redirect occurs.
629
883
</entry>
630
884
<entry valign="top">
631
-
Added in cURL 7.19.1. Available since PHP 5.3.2.
885
+
Added in cURL 7.19.1.
632
886
</entry>
633
887
</row>
634
888
<row>
...
...
@@ -644,19 +898,20 @@
644
898
</para>
645
899
<para>
646
900
Valid protocol options are:
647
-
<parameter>CURLPROTO_HTTP</parameter>,
648
-
<parameter>CURLPROTO_HTTPS</parameter>,
649
-
<parameter>CURLPROTO_FTP</parameter>,
650
-
<parameter>CURLPROTO_FTPS</parameter>,
651
-
<parameter>CURLPROTO_SCP</parameter>,
652
-
<parameter>CURLPROTO_SFTP</parameter>,
653
-
<parameter>CURLPROTO_TELNET</parameter>,
654
-
<parameter>CURLPROTO_LDAP</parameter>,
655
-
<parameter>CURLPROTO_LDAPS</parameter>,
656
-
<parameter>CURLPROTO_DICT</parameter>,
657
-
<parameter>CURLPROTO_FILE</parameter>,
658
-
<parameter>CURLPROTO_TFTP</parameter>,
659
-
<parameter>CURLPROTO_ALL</parameter>
901
+
<constant>CURLPROTO_HTTP</constant>,
902
+
<constant>CURLPROTO_HTTPS</constant>,
903
+
<constant>CURLPROTO_FTP</constant>,
904
+
<constant>CURLPROTO_FTPS</constant>,
905
+
<constant>CURLPROTO_SCP</constant>,
906
+
<constant>CURLPROTO_SFTP</constant>,
907
+
<constant>CURLPROTO_TELNET</constant>,
908
+
<constant>CURLPROTO_LDAP</constant>,
909
+
<constant>CURLPROTO_LDAPS</constant>,
910
+
<constant>CURLPROTO_DICT</constant>,
911
+
<constant>CURLPROTO_FILE</constant>,
912
+
<constant>CURLPROTO_TFTP</constant>,
913
+
<constant>CURLPROTO_MQTT</constant>,
914
+
<constant>CURLPROTO_ALL</constant>
660
915
</para>
661
916
</entry>
662
917
<entry valign="top">
...
...
@@ -669,8 +924,8 @@
669
924
The HTTP authentication method(s) to use for the proxy connection.
670
925
Use the same bitmasks as described in
671
926
<constant>CURLOPT_HTTPAUTH</constant>. For proxy authentication,
672
-
only <parameter>CURLAUTH_BASIC</parameter> and
673
-
<parameter>CURLAUTH_NTLM</parameter> are currently supported.
927
+
only <constant>CURLAUTH_BASIC</constant> and
928
+
<constant>CURLAUTH_NTLM</constant> are currently supported.
674
929
</entry>
675
930
<entry valign="top">
676
931
Added in cURL 7.10.7.
...
...
@@ -723,16 +978,90 @@
723
978
</entry>
724
979
</row>
725
980
<row>
981
+
<entry valign="top"><constant>CURLOPT_SOCKS5_AUTH</constant></entry>
982
+
<entry valign="top">
983
+
<para>
984
+
The SOCKS5 authentication method(s) to use. The options are:
985
+
<constant>CURLAUTH_BASIC</constant>,
986
+
<constant>CURLAUTH_GSSAPI</constant>,
987
+
<constant>CURLAUTH_NONE</constant>.
988
+
</para>
989
+
<para>
990
+
The bitwise <literal>|</literal> (or) operator can be used to combine
991
+
more than one method. If this is done, cURL will poll the server to see
992
+
what methods it supports and pick the best one.
993
+
</para>
994
+
<para>
995
+
<constant>CURLAUTH_BASIC</constant> allows username/password authentication.
996
+
</para>
997
+
<para>
998
+
<constant>CURLAUTH_GSSAPI</constant> allows GSS-API authentication.
999
+
</para>
1000
+
<para>
1001
+
<constant>CURLAUTH_NONE</constant> allows no authentication.
1002
+
</para>
1003
+
<para>
1004
+
Defaults to <literal>CURLAUTH_BASIC|CURLAUTH_GSSAPI</literal>.
1005
+
Set the actual username and password with the <constant>CURLOPT_PROXYUSERPWD</constant> option.
1006
+
</para>
1007
+
</entry>
1008
+
<entry valign="top">
1009
+
Available as of 7.3.0 and curl &gt;= 7.55.0.
1010
+
</entry>
1011
+
</row>
1012
+
<row>
1013
+
<entry valign="top"><constant>CURLOPT_SSL_OPTIONS</constant></entry>
1014
+
<entry valign="top">
1015
+
Set SSL behavior options, which is a bitmask of any of the following constants:
1016
+
<simpara>
1017
+
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
1018
+
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
1019
+
</simpara>
1020
+
<simpara>
1021
+
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
1022
+
revocation checks for those SSL backends where such behavior is
1023
+
present.
1024
+
</simpara>
1025
+
<simpara>
1026
+
<constant>CURLSSLOPT_AUTO_CLIENT_CERT</constant>: automatically
1027
+
locate and use a client certificate for authentication, when
1028
+
requested by the server. This option is only supported for
1029
+
Schannel (the native Windows SSL library).
1030
+
</simpara>
1031
+
<simpara>
1032
+
<constant>CURLSSLOPT_NATIVE_CA</constant>: use the operating system's
1033
+
native CA store for certificate verification. Works only on Windows
1034
+
when built to use OpenSSL. This option is experimental and behavior is subject to change.
1035
+
</simpara>
1036
+
<simpara>
1037
+
<constant>CURLSSLOPT_NO_PARTIALCHAIN</constant>: do not accept "partial" certificate
1038
+
chains, which cURL otherwise does by default. This option is only supported for OpenSSL
1039
+
and will fail the certificate verification if the chain ends with
1040
+
an intermediate certificate and not with a root certificate.
1041
+
</simpara>
1042
+
<simpara>
1043
+
<constant>CURLSSLOPT_REVOKE_BEST_EFFORT</constant>: ignore certificate revocation checks
1044
+
in case of missing or offline distribution points for those SSL backends where
1045
+
such behavior is present. This option is only supported for Schannel (the native Windows SSL library).
1046
+
If combined with <constant>CURLSSLOPT_NO_REVOKE</constant>, the latter takes precedence.
1047
+
</simpara>
1048
+
</entry>
1049
+
<entry valign="top">
1050
+
Added in cURL 7.25.0. Available since PHP 7.0.7.
1051
+
</entry>
1052
+
</row>
1053
+
<row>
726
1054
<entry valign="top"><constant>CURLOPT_SSL_VERIFYHOST</constant></entry>
727
1055
<entry valign="top">
728
-
1 to check the existence of a common name in the
729
-
SSL peer certificate. 2 to check the existence of
730
-
a common name and also verify that it matches the hostname
731
-
provided. In production environments the value of this option
732
-
should be kept at 2 (default value).
1056
+
<literal>2</literal> to verify that a Common Name field or a Subject Alternate Name
1057
+
field in the SSL peer certificate matches the provided hostname.
1058
+
<literal>0</literal> to not check the names.
1059
+
<literal>1</literal> should not be used.
1060
+
In production environments the value of this option
1061
+
should be kept at <literal>2</literal> (default value).
733
1062
</entry>
734
1063
<entry valign="top">
735
-
Support for value 1 removed in cURL 7.28.1
1064
+
Support for value <literal>1</literal> removed in cURL 7.28.1.
736
1065
</entry>
737
1066
</row>
738
1067
<row>
...
...
@@ -743,8 +1072,17 @@
743
1072
<constant>CURL_SSLVERSION_SSLv2</constant> (2),
744
1073
<constant>CURL_SSLVERSION_SSLv3</constant> (3),
745
1074
<constant>CURL_SSLVERSION_TLSv1_0</constant> (4),
746
-
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5) or
747
-
<constant>CURL_SSLVERSION_TLSv1_2</constant> (6).
1075
+
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5),
1076
+
<constant>CURL_SSLVERSION_TLSv1_2</constant> (6) or
1077
+
<constant>CURL_SSLVERSION_TLSv1_3</constant> (7).
1078
+
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_*</constant>
1079
+
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_*</constant>
1080
+
constants with one of the <constant>CURL_SSLVERSION_MAX_*</constant> constants.
1081
+
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant> (the maximum version supported by the library),
1082
+
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
1083
+
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
1084
+
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>, or
1085
+
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant>.
748
1086
<note>
749
1087
<para>
750
1088
Your best bet is to not set this and let it use the default.
...
...
@@ -757,63 +1095,208 @@
757
1095
</entry>
758
1096
</row>
759
1097
<row>
760
-
<entry valign="top"><constant>CURLOPT_TIMECONDITION</constant></entry>
1098
+
<entry valign="top"><constant>CURLOPT_PROXY_SSL_OPTIONS</constant></entry>
761
1099
<entry valign="top">
762
-
How <constant>CURLOPT_TIMEVALUE</constant> is treated.
763
-
Use <parameter>CURL_TIMECOND_IFMODSINCE</parameter> to return the
764
-
page only if it has been modified since the time specified in
765
-
<constant>CURLOPT_TIMEVALUE</constant>. If it hasn't been modified,
766
-
a <literal>"304 Not Modified"</literal> header will be returned
767
-
assuming <constant>CURLOPT_HEADER</constant> is &true;.
768
-
Use <parameter>CURL_TIMECOND_IFUNMODSINCE</parameter> for the reverse
769
-
effect. <parameter>CURL_TIMECOND_IFMODSINCE</parameter> is the
770
-
default.
1100
+
Set proxy SSL behavior options, which is a bitmask of any of the following constants:
1101
+
<simpara>
1102
+
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
1103
+
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
1104
+
</simpara>
1105
+
<simpara>
1106
+
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
1107
+
revocation checks for those SSL backends where such behavior is
1108
+
present. (curl &gt;= 7.44.0)
1109
+
</simpara>
1110
+
<simpara>
1111
+
<constant>CURLSSLOPT_NO_PARTIALCHAIN</constant>: do not accept "partial"
1112
+
certificate chains, which it otherwise does by default. (curl &gt;= 7.68.0)
1113
+
</simpara>
771
1114
</entry>
772
1115
<entry valign="top">
1116
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
773
1117
</entry>
774
1118
</row>
775
1119
<row>
776
-
<entry valign="top"><constant>CURLOPT_TIMEOUT</constant></entry>
1120
+
<entry valign="top"><constant>CURLOPT_PROXY_SSL_VERIFYHOST</constant></entry>
777
1121
<entry valign="top">
778
-
The maximum number of seconds to allow cURL functions to execute.
1122
+
Set to <literal>2</literal> to verify in the HTTPS proxy's certificate name fields against the proxy name.
1123
+
When set to <literal>0</literal> the connection succeeds regardless of the names used in the certificate.
1124
+
Use that ability with caution!
1125
+
<literal>1</literal> treated as a debug option in curl 7.28.0 and earlier.
1126
+
From curl 7.28.1 to 7.65.3 <constant>CURLE_BAD_FUNCTION_ARGUMENT</constant> is returned.
1127
+
From curl 7.66.0 onwards <literal>1</literal> and <literal>2</literal> is treated as the same value.
1128
+
In production environments the value of this option should be kept at <literal>2</literal> (default value).
779
1129
</entry>
780
1130
<entry valign="top">
1131
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
781
1132
</entry>
782
1133
</row>
783
1134
<row>
784
-
<entry valign="top"><constant>CURLOPT_TIMEOUT_MS</constant></entry>
1135
+
<entry valign="top"><constant>CURLOPT_PROXY_SSLVERSION</constant></entry>
785
1136
<entry valign="top">
786
-
The maximum number of milliseconds to allow cURL functions to
787
-
execute.
788
-
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
789
-
If libcurl is built to use the standard system name resolver, that
790
-
portion of the connect will still use full-second resolution for
791
-
timeouts with a minimum timeout allowed of one second.
1137
+
One of <constant>CURL_SSLVERSION_DEFAULT</constant>,
1138
+
<constant>CURL_SSLVERSION_TLSv1</constant>,
1139
+
<constant>CURL_SSLVERSION_TLSv1_0</constant>,
1140
+
<constant>CURL_SSLVERSION_TLSv1_1</constant>,
1141
+
<constant>CURL_SSLVERSION_TLSv1_2</constant>,
1142
+
<constant>CURL_SSLVERSION_TLSv1_3</constant>,
1143
+
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant>,
1144
+
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
1145
+
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
1146
+
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>,
1147
+
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant> or
1148
+
<constant>CURL_SSLVERSION_SSLv3</constant>.
1149
+
<note>
1150
+
<para>
1151
+
Your best bet is to not set this and let it use the default <constant>CURL_SSLVERSION_DEFAULT</constant>
1152
+
which will attempt to figure out the remote SSL protocol version.
1153
+
</para>
1154
+
</note>
792
1155
</entry>
793
1156
<entry valign="top">
794
-
Added in cURL 7.16.2. Available since PHP 5.2.3.
1157
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
795
1158
</entry>
796
1159
</row>
797
1160
<row>
798
-
<entry valign="top"><constant>CURLOPT_TIMEVALUE</constant></entry>
1161
+
<entry valign="top"><constant>CURLOPT_STREAM_WEIGHT</constant></entry>
799
1162
<entry valign="top">
800
-
The time in seconds since January 1st, 1970. The time will be used
801
-
by <constant>CURLOPT_TIMECONDITION</constant>. By default,
802
-
<parameter>CURL_TIMECOND_IFMODSINCE</parameter> is used.
1163
+
Set the numerical stream weight (a number between 1 and 256).
803
1164
</entry>
804
1165
<entry valign="top">
1166
+
Added in cURL 7.46.0. Available since PHP 7.0.7.
805
1167
</entry>
806
1168
</row>
807
1169
<row>
808
-
<entry valign="top"><constant>CURLOPT_MAX_RECV_SPEED_LARGE</constant></entry>
1170
+
<entry valign="top"><constant>CURLOPT_TCP_KEEPALIVE</constant></entry>
809
1171
<entry valign="top">
810
-
If a download exceeds this speed (counted in bytes per second) on
1172
+
If set to <literal>1</literal>, TCP keepalive probes will be sent. The delay and
1173
+
frequency of these probes can be controlled by the <constant>CURLOPT_TCP_KEEPIDLE</constant>
1174
+
and <constant>CURLOPT_TCP_KEEPINTVL</constant> options, provided the operating system
1175
+
supports them. If set to <literal>0</literal> (default) keepalive probes are disabled.
1176
+
</entry>
1177
+
<entry valign="top">
1178
+
Added in cURL 7.25.0.
1179
+
</entry>
1180
+
</row>
1181
+
<row>
1182
+
<entry valign="top"><constant>CURLOPT_TCP_KEEPIDLE</constant></entry>
1183
+
<entry valign="top">
1184
+
Sets the delay, in seconds, that the operating system will wait while the connection is
1185
+
idle before sending keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is
1186
+
enabled. Not all operating systems support this option.
1187
+
The default is <literal>60</literal>.
1188
+
</entry>
1189
+
<entry valign="top">
1190
+
Added in cURL 7.25.0.
1191
+
</entry>
1192
+
</row>
1193
+
<row>
1194
+
<entry valign="top"><constant>CURLOPT_TCP_KEEPINTVL</constant></entry>
1195
+
<entry valign="top">
1196
+
Sets the interval, in seconds, that the operating system will wait between sending
1197
+
keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is enabled.
1198
+
Not all operating systems support this option.
1199
+
The default is <literal>60</literal>.
1200
+
</entry>
1201
+
<entry valign="top">
1202
+
Added in cURL 7.25.0.
1203
+
</entry>
1204
+
</row>
1205
+
<row>
1206
+
<entry valign="top"><constant>CURLOPT_TIMECONDITION</constant></entry>
1207
+
<entry valign="top">
1208
+
How <constant>CURLOPT_TIMEVALUE</constant> is treated.
1209
+
Use <constant>CURL_TIMECOND_IFMODSINCE</constant> to return the
1210
+
page only if it has been modified since the time specified in
1211
+
<constant>CURLOPT_TIMEVALUE</constant>. If it hasn't been modified,
1212
+
a <literal>"304 Not Modified"</literal> header will be returned
1213
+
assuming <constant>CURLOPT_HEADER</constant> is &true;.
1214
+
Use <constant>CURL_TIMECOND_IFUNMODSINCE</constant> for the reverse
1215
+
effect. Use <constant>CURL_TIMECOND_NONE</constant> to ignore
1216
+
<constant>CURLOPT_TIMEVALUE</constant> and always return the page.
1217
+
<constant>CURL_TIMECOND_NONE</constant> is the default.
1218
+
</entry>
1219
+
<entry valign="top">
1220
+
Before cURL 7.46.0 the default was
1221
+
<constant>CURL_TIMECOND_IFMODSINCE</constant>.
1222
+
</entry>
1223
+
</row>
1224
+
<row>
1225
+
<entry valign="top"><constant>CURLOPT_TIMEOUT</constant></entry>
1226
+
<entry valign="top">
1227
+
The maximum number of seconds to allow cURL functions to execute.
1228
+
</entry>
1229
+
<entry valign="top">
1230
+
</entry>
1231
+
</row>
1232
+
<row>
1233
+
<entry valign="top"><constant>CURLOPT_TIMEOUT_MS</constant></entry>
1234
+
<entry valign="top">
1235
+
The maximum number of milliseconds to allow cURL functions to
1236
+
execute.
1237
+
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
1238
+
If libcurl is built to use the standard system name resolver, that
1239
+
portion of the connect will still use full-second resolution for
1240
+
timeouts with a minimum timeout allowed of one second.
1241
+
</entry>
1242
+
<entry valign="top">
1243
+
Added in cURL 7.16.2.
1244
+
</entry>
1245
+
</row>
1246
+
<row>
1247
+
<entry valign="top"><constant>CURLOPT_TIMEVALUE</constant></entry>
1248
+
<entry valign="top">
1249
+
The time in seconds since January 1st, 1970. The time will be used
1250
+
by <constant>CURLOPT_TIMECONDITION</constant>.
1251
+
</entry>
1252
+
<entry valign="top">
1253
+
</entry>
1254
+
</row>
1255
+
<row>
1256
+
<entry valign="top"><constant>CURLOPT_TIMEVALUE_LARGE</constant></entry>
1257
+
<entry valign="top">
1258
+
The time in seconds since January 1st, 1970. The time will be used
1259
+
by <constant>CURLOPT_TIMECONDITION</constant>. Defaults to zero.
1260
+
The difference between this option and <constant>CURLOPT_TIMEVALUE</constant>
1261
+
is the type of the argument. On systems where 'long' is only 32 bit wide,
1262
+
this option has to be used to set dates beyond the year 2038.
1263
+
</entry>
1264
+
<entry valign="top">
1265
+
Added in cURL 7.59.0. Available since PHP 7.3.0.
1266
+
</entry>
1267
+
</row>
1268
+
<row>
1269
+
<entry valign="top"><constant>CURLOPT_UPKEEP_INTERVAL_MS</constant></entry>
1270
+
<entry valign="top">
1271
+
Some protocols have "connection upkeep" mechanisms. These mechanisms usually send some traffic
1272
+
on existing connections in order to keep them alive. This option defines the connection upkeep interval.
1273
+
Currently, the only protocol with a connection upkeep mechanism is HTTP/2. When the connection upkeep
1274
+
interval is exceeded, an HTTP/2 PING frame is sent on the connection.
1275
+
Default is <literal>60</literal> seconds.
1276
+
</entry>
1277
+
<entry valign="top">
1278
+
</entry>
1279
+
</row>
1280
+
<row>
1281
+
<entry valign="top"><constant>CURLOPT_UPLOAD_BUFFERSIZE</constant></entry>
1282
+
<entry valign="top">
1283
+
Preferred buffer size in bytes for the cURL upload buffer.
1284
+
The upload buffer size by default is 64 kilobytes. The maximum buffer size allowed to be set is 2 megabytes.
1285
+
The minimum buffer size allowed to be set is 16 kilobytes.
1286
+
</entry>
1287
+
<entry valign="top">
1288
+
</entry>
1289
+
</row>
1290
+
<row>
1291
+
<entry valign="top"><constant>CURLOPT_MAX_RECV_SPEED_LARGE</constant></entry>
1292
+
<entry valign="top">
1293
+
If a download exceeds this speed (counted in bytes per second) on
811
1294
cumulative average during the transfer, the transfer will pause to
812
1295
keep the average rate less than or equal to the parameter value.
813
1296
Defaults to unlimited speed.
814
1297
</entry>
815
1298
<entry valign="top">
816
-
Added in cURL 7.15.5. Available since PHP 5.4.0.
1299
+
Added in cURL 7.15.5.
817
1300
</entry>
818
1301
</row>
819
1302
<row>
...
...
@@ -825,7 +1308,7 @@
825
1308
Defaults to unlimited speed.
826
1309
</entry>
827
1310
<entry valign="top">
828
-
Added in cURL 7.15.5. Available since PHP 5.4.0.
1311
+
Added in cURL 7.15.5.
829
1312
</entry>
830
1313
</row>
831
1314
<row>
...
...
@@ -857,6 +1340,19 @@
857
1340
Added in cURL 7.10.8.
858
1341
</entry>
859
1342
</row>
1343
+
<row>
1344
+
<entry valign="top"><constant>CURLOPT_FTP_FILEMETHOD</constant></entry>
1345
+
<entry valign="top">
1346
+
Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
1347
+
<constant>CURLFTPMETHOD_DEFAULT</constant>,
1348
+
<constant>CURLFTPMETHOD_MULTICWD</constant>,
1349
+
<constant>CURLFTPMETHOD_NOCWD</constant>, and
1350
+
<constant>CURLFTPMETHOD_SINGLECWD</constant>.
1351
+
</entry>
1352
+
<entry valign="top">
1353
+
Added in cURL 7.15.1.
1354
+
</entry>
1355
+
</row>
860
1356
</tbody>
861
1357
</tgroup>
862
1358
</informaltable>
...
...
@@ -875,6 +1371,59 @@
875
1371
</thead>
876
1372
<tbody>
877
1373
<row>
1374
+
<entry valign="top"><constant>CURLOPT_ABSTRACT_UNIX_SOCKET</constant></entry>
1375
+
<entry valign="top">
1376
+
Enables the use of an abstract Unix domain socket instead of
1377
+
establishing a TCP connection to a host and sets the path to
1378
+
the given <type>string</type>. This option shares the same semantics
1379
+
as <constant>CURLOPT_UNIX_SOCKET_PATH</constant>. These two options
1380
+
share the same storage and therefore only one of them can be set
1381
+
per handle.
1382
+
</entry>
1383
+
<entry valign="top">
1384
+
Available since PHP 7.3.0 and cURL 7.53.0
1385
+
</entry>
1386
+
</row>
1387
+
<row>
1388
+
<entry valign="top"><constant>CURLOPT_ALTSVC</constant></entry>
1389
+
<entry valign="top">
1390
+
Pass the filename for cURL to use as the Alt-Svc cache file to read existing cache contents from and
1391
+
possibly also write it back to a after a transfer, unless <constant>CURLALTSVC_READONLYFILE</constant>
1392
+
is set via <constant>CURLOPT_ALTSVC_CTRL</constant>.
1393
+
</entry>
1394
+
<entry valign="top">
1395
+
</entry>
1396
+
</row>
1397
+
<row>
1398
+
<entry valign="top"><constant>CURLOPT_ALTSVC_CTRL</constant></entry>
1399
+
<entry valign="top">
1400
+
Populate the bitmask with the correct set of features to instruct cURL how to handle Alt-Svc for the
1401
+
transfers using this handle. cURL only accepts Alt-Svc headers over HTTPS. It will also only complete
1402
+
a request to an alternative origin if that origin is properly hosted over HTTPS.
1403
+
Setting any bit will enable the alt-svc engine. The options are:
1404
+
<constant>CURLALTSVC_H1</constant>,
1405
+
<constant>CURLALTSVC_H2</constant>,
1406
+
<constant>CURLALTSVC_H3</constant>, and
1407
+
<constant>CURLALTSVC_READONLYFILE</constant>.
1408
+
</entry>
1409
+
<entry valign="top">
1410
+
</entry>
1411
+
</row>
1412
+
<row>
1413
+
<entry valign="top"><constant>CURLOPT_AWS_SIGV4</constant></entry>
1414
+
<entry valign="top">
1415
+
<para>
1416
+
Provides AWS V4 signature authentication on HTTP(S) header.
1417
+
</para>
1418
+
<para>
1419
+
This option overrides any other authentication types that have been set in
1420
+
<constant>CURLOPT_HTTPAUTH</constant>. This method cannot be combined with other authentication types.
1421
+
</para>
1422
+
</entry>
1423
+
<entry valign="top">
1424
+
</entry>
1425
+
</row>
1426
+
<row>
878
1427
<entry valign="top"><constant>CURLOPT_CAINFO</constant></entry>
879
1428
<entry valign="top">
880
1429
The name of a file holding one or more certificates to verify the
...
...
@@ -886,6 +1435,16 @@
886
1435
</entry>
887
1436
</row>
888
1437
<row>
1438
+
<entry valign="top"><constant>CURLOPT_CAINFO_BLOB</constant></entry>
1439
+
<entry valign="top">
1440
+
The name of a PEM file holding one or more certificates to verify the
1441
+
peer with. This option overrides <constant>CURLOPT_CAINFO</constant>.
1442
+
</entry>
1443
+
<entry valign="top">
1444
+
Available as of PHP 8.2.0 and cURL 7.77.0
1445
+
</entry>
1446
+
</row>
1447
+
<row>
889
1448
<entry valign="top"><constant>CURLOPT_CAPATH</constant></entry>
890
1449
<entry valign="top">
891
1450
A directory that holds multiple CA certificates. Use this option
...
...
@@ -927,6 +1486,20 @@
927
1486
</entry>
928
1487
</row>
929
1488
<row>
1489
+
<entry valign="top"><constant>CURLOPT_COOKIELIST</constant></entry>
1490
+
<entry valign="top">
1491
+
A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular
1492
+
HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store.
1493
+
<literal>"ALL"</literal> erases all cookies held in memory.
1494
+
<literal>"SESS"</literal> erases all session cookies held in memory.
1495
+
<literal>"FLUSH"</literal> writes all known cookies to the file specified by <constant>CURLOPT_COOKIEJAR</constant>.
1496
+
<literal>"RELOAD"</literal> loads all cookies from the files specified by <constant>CURLOPT_COOKIEFILE</constant>.
1497
+
</entry>
1498
+
<entry valign="top">
1499
+
Available since cURL 7.14.1.
1500
+
</entry>
1501
+
</row>
1502
+
<row>
930
1503
<entry valign="top"><constant>CURLOPT_CUSTOMREQUEST</constant></entry>
931
1504
<entry valign="top"><para>
932
1505
A custom request method to use instead of
...
...
@@ -949,6 +1522,45 @@
949
1522
</entry>
950
1523
</row>
951
1524
<row>
1525
+
<entry valign="top"><constant>CURLOPT_DEFAULT_PROTOCOL</constant></entry>
1526
+
<entry valign="top"><para>
1527
+
The default protocol to use if the URL is missing a scheme name.
1528
+
</para></entry>
1529
+
<entry valign="top">
1530
+
Added in cURL 7.45.0. Available since PHP 7.0.7.
1531
+
</entry>
1532
+
</row>
1533
+
<row>
1534
+
<entry valign="top"><constant>CURLOPT_DNS_INTERFACE</constant></entry>
1535
+
<entry valign="top"><para>
1536
+
Set the name of the network interface that the DNS resolver should bind to.
1537
+
This must be an interface name (not an address).
1538
+
</para></entry>
1539
+
<entry valign="top">
1540
+
Added in cURL 7.33.0. Available since PHP 7.0.7.
1541
+
</entry>
1542
+
</row>
1543
+
<row>
1544
+
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP4</constant></entry>
1545
+
<entry valign="top"><para>
1546
+
Set the local IPv4 address that the resolver should bind to. The argument
1547
+
should contain a single numerical IPv4 address as a string.
1548
+
</para></entry>
1549
+
<entry valign="top">
1550
+
Added in cURL 7.33.0. Available since PHP 7.0.7.
1551
+
</entry>
1552
+
</row>
1553
+
<row>
1554
+
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP6</constant></entry>
1555
+
<entry valign="top"><para>
1556
+
Set the local IPv6 address that the resolver should bind to. The argument
1557
+
should contain a single numerical IPv6 address as a string.
1558
+
</para></entry>
1559
+
<entry valign="top">
1560
+
Added in cURL 7.33.0. Available since PHP 7.0.7.
1561
+
</entry>
1562
+
</row>
1563
+
<row>
952
1564
<entry valign="top"><constant>CURLOPT_EGDSOCKET</constant></entry>
953
1565
<entry valign="top">
954
1566
Like <constant>CURLOPT_RANDOM_FILE</constant>, except a filename
...
...
@@ -984,6 +1596,29 @@
984
1596
</entry>
985
1597
</row>
986
1598
<row>
1599
+
<entry valign="top"><constant>CURLOPT_HSTS</constant></entry>
1600
+
<entry valign="top">
1601
+
<para>
1602
+
HSTS (HTTP Strict Transport Security) cache file name.
1603
+
</para>
1604
+
</entry>
1605
+
<entry valign="top">
1606
+
</entry>
1607
+
</row>
1608
+
<row>
1609
+
<entry valign="top"><constant>CURLOPT_HSTS_CTRL</constant></entry>
1610
+
<entry valign="top">
1611
+
<para>
1612
+
Controls HSTS (HTTP Strict Transport Security) behavior. Populate the bitmask with the correct set of
1613
+
features to instruct cURL how to handle HSTS for the transfers using this handle.
1614
+
<constant>CURLHSTS_ENABLE</constant> enables the in-memory HSTS cache. If the HSTS cache file is defined,
1615
+
set <constant>CURLHSTS_READONLYFILE</constant> to make the file read-only.
1616
+
</para>
1617
+
</entry>
1618
+
<entry valign="top">
1619
+
</entry>
1620
+
</row>
1621
+
<row>
987
1622
<entry valign="top"><constant>CURLOPT_INTERFACE</constant></entry>
988
1623
<entry valign="top">
989
1624
The name of the outgoing network interface to use. This can be an
...
...
@@ -1020,14 +1655,36 @@
1020
1655
</entry>
1021
1656
</row>
1022
1657
<row>
1658
+
<entry valign="top"><constant>CURLOPT_LOGIN_OPTIONS</constant></entry>
1659
+
<entry valign="top">
1660
+
Can be used to set protocol specific login options, such as the
1661
+
preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
1662
+
and should be used in conjunction with the
1663
+
<constant>CURLOPT_USERNAME</constant> option.
1664
+
</entry>
1665
+
<entry valign="top">
1666
+
Added in cURL 7.34.0. Available since PHP 7.0.7.
1667
+
</entry>
1668
+
</row>
1669
+
<row>
1670
+
<entry valign="top"><constant>CURLOPT_PINNEDPUBLICKEY</constant></entry>
1671
+
<entry valign="top">
1672
+
Set the pinned public key.
1673
+
The string can be the file name of your pinned public key. The file
1674
+
format expected is "PEM" or "DER". The string can also be any
1675
+
number of base64 encoded sha256 hashes preceded by "sha256//" and
1676
+
separated by ";".
1677
+
</entry>
1678
+
<entry valign="top">
1679
+
Added in cURL 7.39.0. Available since PHP 7.0.7.
1680
+
</entry>
1681
+
</row>
1682
+
<row>
1023
1683
<entry valign="top"><constant>CURLOPT_POSTFIELDS</constant></entry>
1024
1684
<entry valign="top">
1025
1685
<simpara>
1026
1686
The full data to post in a HTTP "POST" operation.
1027
-
To post a file, prepend a filename with <literal>@</literal> and
1028
-
use the full path. The filetype can be explicitly specified by
1029
-
following the filename with the type in the format
1030
-
'<literal>;type=mimetype</literal>'. This parameter can either be
1687
+
This parameter can either be
1031
1688
passed as a urlencoded string like '<literal>para1=val1&amp;para2=val2&amp;...</literal>'
1032
1689
or as an array with the field name as key and field data as value.
1033
1690
If <parameter>value</parameter> is an array, the
...
...
@@ -1035,21 +1692,48 @@
1035
1692
<literal>multipart/form-data</literal>.
1036
1693
</simpara>
1037
1694
<simpara>
1038
-
As of PHP 5.2.0, <parameter>value</parameter> must be an array if
1039
-
files are passed to this option with the <literal>@</literal> prefix.
1040
-
</simpara>
1041
-
<simpara>
1042
-
As of PHP 5.5.0, the <literal>@</literal> prefix is deprecated and
1043
-
files can be sent using <classname>CURLFile</classname>. The
1044
-
<literal>@</literal> prefix can be disabled for safe passing of
1045
-
values beginning with <literal>@</literal> by setting the
1046
-
<constant>CURLOPT_SAFE_UPLOAD</constant> option to &true;.
1695
+
Files can be sent using <classname>CURLFile</classname> or <classname>CURLStringFile</classname>,
1696
+
in which case <parameter>value</parameter> must be an array.
1047
1697
</simpara>
1048
1698
</entry>
1049
1699
<entry valign="top">
1050
1700
</entry>
1051
1701
</row>
1052
1702
<row>
1703
+
<entry valign="top"><constant>CURLOPT_PRIVATE</constant></entry>
1704
+
<entry valign="top">
1705
+
Any data that should be associated with this cURL handle. This data
1706
+
can subsequently be retrieved with the
1707
+
<constant>CURLINFO_PRIVATE</constant> option of
1708
+
<function>curl_getinfo</function>. cURL does nothing with this data.
1709
+
When using a cURL multi handle, this private data is typically a
1710
+
unique key to identify a standard cURL handle.
1711
+
</entry>
1712
+
<entry valign="top">
1713
+
Added in cURL 7.10.3.
1714
+
</entry>
1715
+
</row>
1716
+
<row>
1717
+
<entry valign="top"><constant>CURLOPT_PRE_PROXY</constant></entry>
1718
+
<entry valign="top">
1719
+
Set a <type>string</type> holding the host name or dotted numerical
1720
+
IP address to be used as the preproxy that curl connects to before
1721
+
it connects to the HTTP(S) proxy specified in the
1722
+
<constant>CURLOPT_PROXY</constant> option for the upcoming request.
1723
+
The preproxy can only be a SOCKS proxy and it should be prefixed with
1724
+
<literal>[scheme]://</literal> to specify which kind of socks is used.
1725
+
A numerical IPv6 address must be written within [brackets].
1726
+
Setting the preproxy to an empty string explicitly disables the use of a preproxy.
1727
+
To specify port number in this string, append <literal>:[port]</literal>
1728
+
to the end of the host name. The proxy's port number may optionally be
1729
+
specified with the separate option <constant>CURLOPT_PROXYPORT</constant>.
1730
+
Defaults to using port 1080 for proxies if a port is not specified.
1731
+
</entry>
1732
+
<entry valign="top">
1733
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1734
+
</entry>
1735
+
</row>
1736
+
<row>
1053
1737
<entry valign="top"><constant>CURLOPT_PROXY</constant></entry>
1054
1738
<entry valign="top">
1055
1739
The HTTP proxy to tunnel requests through.
...
...
@@ -1058,6 +1742,200 @@
1058
1742
</entry>
1059
1743
</row>
1060
1744
<row>
1745
+
<entry valign="top"><constant>CURLOPT_PROXY_SERVICE_NAME</constant></entry>
1746
+
<entry valign="top">
1747
+
The proxy authentication service name.
1748
+
</entry>
1749
+
<entry valign="top">
1750
+
Added in cURL 7.43.0 for HTTP proxies, and in cURL 7.49.0 for SOCKS5 proxies.
1751
+
Available since PHP 7.0.7.
1752
+
</entry>
1753
+
</row>
1754
+
<row>
1755
+
<entry valign="top"><constant>CURLOPT_PROXY_CAINFO</constant></entry>
1756
+
<entry valign="top">
1757
+
The path to proxy Certificate Authority (CA) bundle. Set the path as a
1758
+
<type>string</type> naming a file holding one or more certificates to
1759
+
verify the HTTPS proxy with.
1760
+
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1761
+
Defaults set to the system path where libcurl's cacert bundle is assumed
1762
+
to be stored.
1763
+
</entry>
1764
+
<entry valign="top">
1765
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1766
+
</entry>
1767
+
</row>
1768
+
<row>
1769
+
<entry valign="top"><constant>CURLOPT_PROXY_CAINFO_BLOB</constant></entry>
1770
+
<entry valign="top">
1771
+
The name of a PEM file holding one or more certificates to verify the HTTPS proxy with.
1772
+
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1773
+
Defaults set to the system path where libcurl's cacert bundle is assumed
1774
+
to be stored.
1775
+
</entry>
1776
+
<entry valign="top">
1777
+
Available as of PHP 8.2.0 and libcurl &gt;= cURL 7.77.0.
1778
+
</entry>
1779
+
</row>
1780
+
<row>
1781
+
<entry valign="top"><constant>CURLOPT_PROXY_CAPATH</constant></entry>
1782
+
<entry valign="top">
1783
+
The directory holding multiple CA certificates to verify the HTTPS proxy with.
1784
+
</entry>
1785
+
<entry valign="top">
1786
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1787
+
</entry>
1788
+
</row>
1789
+
<row>
1790
+
<entry valign="top"><constant>CURLOPT_PROXY_CRLFILE</constant></entry>
1791
+
<entry valign="top">
1792
+
Set the file name with the concatenation of CRL (Certificate Revocation List)
1793
+
in PEM format to use in the certificate validation that occurs during
1794
+
the SSL exchange.
1795
+
</entry>
1796
+
<entry valign="top">
1797
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1798
+
</entry>
1799
+
</row>
1800
+
<row>
1801
+
<entry valign="top"><constant>CURLOPT_PROXY_KEYPASSWD</constant></entry>
1802
+
<entry valign="top">
1803
+
Set the string be used as the password required to use the
1804
+
<constant>CURLOPT_PROXY_SSLKEY</constant> private key. You never needed a
1805
+
passphrase to load a certificate but you need one to load your private key.
1806
+
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1807
+
</entry>
1808
+
<entry valign="top">
1809
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1810
+
</entry>
1811
+
</row>
1812
+
<row>
1813
+
<entry valign="top"><constant>CURLOPT_PROXY_PINNEDPUBLICKEY</constant></entry>
1814
+
<entry valign="top">
1815
+
Set the pinned public key for HTTPS proxy. The string can be the file name
1816
+
of your pinned public key. The file format expected is "PEM" or "DER".
1817
+
The string can also be any number of base64 encoded sha256 hashes preceded by
1818
+
"sha256//" and separated by ";"
1819
+
</entry>
1820
+
<entry valign="top">
1821
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1822
+
</entry>
1823
+
</row>
1824
+
<row>
1825
+
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERT</constant></entry>
1826
+
<entry valign="top">
1827
+
The file name of your client certificate used to connect to the HTTPS proxy.
1828
+
The default format is "P12" on Secure Transport and "PEM" on other engines,
1829
+
and can be changed with <constant>CURLOPT_PROXY_SSLCERTTYPE</constant>.
1830
+
With NSS or Secure Transport, this can also be the nickname of the certificate
1831
+
you wish to authenticate with as it is named in the security database.
1832
+
If you want to use a file from the current directory, please precede it with
1833
+
"./" prefix, in order to avoid confusion with a nickname.
1834
+
</entry>
1835
+
<entry valign="top">
1836
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1837
+
</entry>
1838
+
</row>
1839
+
<row>
1840
+
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERTTYPE</constant></entry>
1841
+
<entry valign="top">
1842
+
The format of your client certificate used when connecting to an HTTPS proxy.
1843
+
Supported formats are "PEM" and "DER", except with Secure Transport.
1844
+
OpenSSL (versions 0.9.3 and later) and Secure Transport
1845
+
(on iOS 5 or later, or OS X 10.7 or later) also support "P12" for
1846
+
PKCS#12-encoded files. Defaults to "PEM".
1847
+
</entry>
1848
+
<entry valign="top">
1849
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1850
+
</entry>
1851
+
</row>
1852
+
<row>
1853
+
<entry valign="top"><constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant></entry>
1854
+
<entry valign="top">
1855
+
The list of ciphers to use for the connection to the HTTPS proxy.
1856
+
The list must be syntactically correct, it consists of one or more cipher
1857
+
strings separated by colons. Commas or spaces are also acceptable separators
1858
+
but colons are normally used, !, - and + can be used as operators.
1859
+
</entry>
1860
+
<entry valign="top">
1861
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1862
+
</entry>
1863
+
</row>
1864
+
<row>
1865
+
<entry valign="top"><constant>CURLOPT_PROXY_TLS13_CIPHERS</constant></entry>
1866
+
<entry valign="top">
1867
+
The list of cipher suites to use for the TLS 1.3 connection to a proxy.
1868
+
The list must be syntactically correct, it consists of one or more
1869
+
cipher suite strings separated by colons. This option is currently used
1870
+
only when curl is built to use OpenSSL 1.1.1 or later.
1871
+
If you are using a different SSL backend you can try setting
1872
+
TLS 1.3 cipher suites by using the <constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant> option.
1873
+
</entry>
1874
+
<entry valign="top">
1875
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.61.0. Available when built with OpenSSL &gt;= 1.1.1.
1876
+
</entry>
1877
+
</row>
1878
+
<row>
1879
+
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEY</constant></entry>
1880
+
<entry valign="top">
1881
+
The file name of your private key used for connecting to the HTTPS proxy.
1882
+
The default format is "PEM" and can be changed with
1883
+
<constant>CURLOPT_PROXY_SSLKEYTYPE</constant>.
1884
+
(iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport.
1885
+
</entry>
1886
+
<entry valign="top">
1887
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0. Available if built TLS enabled.
1888
+
</entry>
1889
+
</row>
1890
+
<row>
1891
+
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEYTYPE</constant></entry>
1892
+
<entry valign="top">
1893
+
The format of your private key. Supported formats are "PEM", "DER" and "ENG".
1894
+
</entry>
1895
+
<entry valign="top">
1896
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1897
+
</entry>
1898
+
</row>
1899
+
<row>
1900
+
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant></entry>
1901
+
<entry valign="top">
1902
+
The password to use for the TLS authentication method specified with the
1903
+
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
1904
+
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> option to also be set.
1905
+
</entry>
1906
+
<entry valign="top">
1907
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1908
+
</entry>
1909
+
</row>
1910
+
<row>
1911
+
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant></entry>
1912
+
<entry valign="top">
1913
+
The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP".
1914
+
<note>
1915
+
<para>
1916
+
Secure Remote Password (SRP) authentication for TLS provides mutual authentication
1917
+
if both sides have a shared secret. To use TLS-SRP, you must also set the
1918
+
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> and
1919
+
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> options.
1920
+
</para>
1921
+
</note>
1922
+
</entry>
1923
+
<entry valign="top">
1924
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1925
+
</entry>
1926
+
</row>
1927
+
<row>
1928
+
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant></entry>
1929
+
<entry valign="top">
1930
+
The username to use for the HTTPS proxy TLS authentication method specified with the
1931
+
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
1932
+
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> option to also be set.
1933
+
</entry>
1934
+
<entry valign="top">
1935
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1936
+
</entry>
1937
+
</row>
1938
+
<row>
1061
1939
<entry valign="top"><constant>CURLOPT_PROXYUSERPWD</constant></entry>
1062
1940
<entry valign="top">
1063
1941
A username and password formatted as
...
...
@@ -1096,6 +1974,26 @@
1096
1974
</entry>
1097
1975
</row>
1098
1976
<row>
1977
+
<entry valign="top"><constant>CURLOPT_SASL_AUTHZID</constant></entry>
1978
+
<entry valign="top">
1979
+
The authorization identity (authzid) for the transfer. Only applicable to the PLAIN SASL
1980
+
authentication mechanism where it is optional. When not specified, only the authentication identity
1981
+
(authcid) as specified by the username will be sent to the server, along with the password.
1982
+
The server will derive the authzid from the authcid when not provided, which it will then use internally.
1983
+
</entry>
1984
+
<entry valign="top">
1985
+
</entry>
1986
+
</row>
1987
+
<row>
1988
+
<entry valign="top"><constant>CURLOPT_SERVICE_NAME</constant></entry>
1989
+
<entry valign="top">
1990
+
The authentication service name.
1991
+
</entry>
1992
+
<entry valign="top">
1993
+
Added in cURL 7.43.0. Available since PHP 7.0.7.
1994
+
</entry>
1995
+
</row>
1996
+
<row>
1099
1997
<entry valign="top"><constant>CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</constant></entry>
1100
1998
<entry valign="top">
1101
1999
A string containing 32 hexadecimal digits. The string should be the
...
...
@@ -1108,6 +2006,15 @@
1108
2006
</entry>
1109
2007
</row>
1110
2008
<row>
2009
+
<entry valign="top"><constant>CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256</constant></entry>
2010
+
<entry valign="top">
2011
+
Base64-encoded SHA256 hash of the remote host's public key.
2012
+
The transfer will fail if the given hash does not match the hash the remote host provides.
2013
+
</entry>
2014
+
<entry valign="top">
2015
+
</entry>
2016
+
</row>
2017
+
<row>
1111
2018
<entry valign="top"><constant>CURLOPT_SSH_PUBLIC_KEYFILE</constant></entry>
1112
2019
<entry valign="top">
1113
2020
The file name for your public key. If not used, libcurl defaults to
...
...
@@ -1142,6 +2049,17 @@
1142
2049
</entry>
1143
2050
</row>
1144
2051
<row>
2052
+
<entry valign="top"><constant>CURLOPT_SSL_EC_CURVES</constant></entry>
2053
+
<entry valign="top">
2054
+
A colon delimited list of elliptic curve algorithms. For example,
2055
+
<literal>X25519:P-521</literal> is a valid list of two elliptic curves.
2056
+
This option defines the client's key exchange algorithms in the SSL handshake,
2057
+
if the SSL backend cURL is built to use supports it.
2058
+
</entry>
2059
+
<entry valign="top">
2060
+
</entry>
2061
+
</row>
2062
+
<row>
1145
2063
<entry valign="top"><constant>CURLOPT_SSLCERT</constant></entry>
1146
2064
<entry valign="top">
1147
2065
The name of a file containing a PEM formatted certificate.
...
...
@@ -1164,6 +2082,8 @@
1164
2082
The format of the certificate. Supported formats are
1165
2083
<literal>"PEM"</literal> (default), <literal>"DER"</literal>,
1166
2084
and <literal>"ENG"</literal>.
2085
+
As of OpenSSL 0.9.3, <literal>"P12"</literal> (for PKCS#12-encoded files)
2086
+
is also supported.
1167
2087
</entry>
1168
2088
<entry valign="top">
1169
2089
Added in cURL 7.9.3.
...
...
@@ -1222,6 +2142,29 @@
1222
2142
</entry>
1223
2143
</row>
1224
2144
<row>
2145
+
<entry valign="top"><constant>CURLOPT_TLS13_CIPHERS</constant></entry>
2146
+
<entry valign="top">
2147
+
The list of cipher suites to use for the TLS 1.3 connection. The list must be
2148
+
syntactically correct, it consists of one or more cipher suite strings separated by colons.
2149
+
This option is currently used only when curl is built to use OpenSSL 1.1.1 or later.
2150
+
If you are using a different SSL backend you can try setting
2151
+
TLS 1.3 cipher suites by using the <constant>CURLOPT_SSL_CIPHER_LIST</constant> option.
2152
+
</entry>
2153
+
<entry valign="top">
2154
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.61.0. Available when built with OpenSSL &gt;= 1.1.1.
2155
+
</entry>
2156
+
</row>
2157
+
<row>
2158
+
<entry valign="top"><constant>CURLOPT_UNIX_SOCKET_PATH</constant></entry>
2159
+
<entry valign="top">
2160
+
Enables the use of Unix domain sockets as connection endpoint and
2161
+
sets the path to the given <type>string</type>.
2162
+
</entry>
2163
+
<entry valign="top">
2164
+
Added in cURL 7.40.0. Available since PHP 7.0.7.
2165
+
</entry>
2166
+
</row>
2167
+
<row>
1225
2168
<entry valign="top"><constant>CURLOPT_URL</constant></entry>
1226
2169
<entry valign="top">
1227
2170
The URL to fetch. This can also be set when initializing a
...
...
@@ -1240,6 +2183,24 @@
1240
2183
</entry>
1241
2184
</row>
1242
2185
<row>
2186
+
<entry valign="top"><constant>CURLOPT_USERNAME</constant></entry>
2187
+
<entry valign="top">
2188
+
The user name to use in authentication.
2189
+
</entry>
2190
+
<entry valign="top">
2191
+
Added in cURL 7.19.1.
2192
+
</entry>
2193
+
</row>
2194
+
<row>
2195
+
<entry valign="top"><constant>CURLOPT_PASSWORD</constant></entry>
2196
+
<entry valign="top">
2197
+
The password to use in authentication.
2198
+
</entry>
2199
+
<entry valign="top">
2200
+
Added in cURL 7.19.1.
2201
+
</entry>
2202
+
</row>
2203
+
<row>
1243
2204
<entry valign="top"><constant>CURLOPT_USERPWD</constant></entry>
1244
2205
<entry valign="top">
1245
2206
A username and password formatted as
...
...
@@ -1249,6 +2210,15 @@
1249
2210
<entry valign="top">
1250
2211
</entry>
1251
2212
</row>
2213
+
<row>
2214
+
<entry valign="top"><constant>CURLOPT_XOAUTH2_BEARER</constant></entry>
2215
+
<entry valign="top">
2216
+
Specifies the OAuth 2.0 access token.
2217
+
</entry>
2218
+
<entry valign="top">
2219
+
Added in cURL 7.33.0. Available since PHP 7.0.7.
2220
+
</entry>
2221
+
</row>
1252
2222
</tbody>
1253
2223
</tgroup>
1254
2224
</informaltable>
...
...
@@ -1267,6 +2237,17 @@
1267
2237
</thead>
1268
2238
<tbody>
1269
2239
<row>
2240
+
<entry valign="top"><constant>CURLOPT_CONNECT_TO</constant></entry>
2241
+
<entry valign="top">
2242
+
Connect to a specific host and port instead of the URL's host and port.
2243
+
Accepts an array of strings with the format
2244
+
<literal>HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT</literal>.
2245
+
</entry>
2246
+
<entry valign="top">
2247
+
Added in cURL 7.49.0. Available since PHP 7.0.7.
2248
+
</entry>
2249
+
</row>
2250
+
<row>
1270
2251
<entry valign="top"><constant>CURLOPT_HTTP200ALIASES</constant></entry>
1271
2252
<entry valign="top">
1272
2253
An array of HTTP 200 responses that will be treated as valid
...
...
@@ -1297,6 +2278,15 @@
1297
2278
</entry>
1298
2279
</row>
1299
2280
<row>
2281
+
<entry valign="top"><constant>CURLOPT_PROXYHEADER</constant></entry>
2282
+
<entry valign="top">
2283
+
An array of custom HTTP headers to pass to proxies.
2284
+
</entry>
2285
+
<entry valign="top">
2286
+
Added in cURL 7.37.0. Available since PHP 7.0.7.
2287
+
</entry>
2288
+
</row>
2289
+
<row>
1300
2290
<entry valign="top"><constant>CURLOPT_QUOTE</constant></entry>
1301
2291
<entry valign="top">
1302
2292
An array of FTP commands to execute on the server prior to the FTP
...
...
@@ -1305,6 +2295,20 @@
1305
2295
<entry valign="top">
1306
2296
</entry>
1307
2297
</row>
2298
+
<row>
2299
+
<entry valign="top"><constant>CURLOPT_RESOLVE</constant></entry>
2300
+
<entry valign="top">
2301
+
Provide a custom address for a specific host and port pair. An array
2302
+
of hostname, port, and IP address strings, each element separated by
2303
+
a colon. In the format:
2304
+
<code>
2305
+
array("example.com:80:127.0.0.1")
2306
+
</code>
2307
+
</entry>
2308
+
<entry valign="top">
2309
+
Added in cURL 7.21.3.
2310
+
</entry>
2311
+
</row>
1308
2312
</tbody>
1309
2313
</tgroup>
1310
2314
</informaltable>
...
...
@@ -1326,7 +2330,7 @@
1326
2330
<entry valign="top"><constant>CURLOPT_FILE</constant></entry>
1327
2331
<entry valign="top">
1328
2332
The file that the transfer should be written to. The default
1329
-
is <literal>STDOUT</literal> (the browser window).
2333
+
is <constant>STDOUT</constant> (the browser window).
1330
2334
</entry>
1331
2335
</row>
1332
2336
<row>
...
...
@@ -1339,7 +2343,7 @@
1339
2343
<entry valign="top"><constant>CURLOPT_STDERR</constant></entry>
1340
2344
<entry valign="top">
1341
2345
An alternative location to output errors to instead of
1342
-
<literal>STDERR</literal>.
2346
+
<constant>STDERR</constant>.
1343
2347
</entry>
1344
2348
</row>
1345
2349
<row>
...
...
@@ -1361,6 +2365,7 @@
1361
2365
<row>
1362
2366
<entry>Option</entry>
1363
2367
<entry>Set <parameter>value</parameter> to</entry>
2368
+
<entry>Notes</entry>
1364
2369
</row>
1365
2370
</thead>
1366
2371
<tbody>
...
...
@@ -1373,6 +2378,7 @@
1373
2378
be written by this callback. Return the number of
1374
2379
bytes written.
1375
2380
</entry>
2381
+
<entry></entry>
1376
2382
</row>
1377
2383
<row>
1378
2384
<entry valign="top"><constant>CURLOPT_PASSWDFUNCTION</constant></entry>
...
...
@@ -1382,6 +2388,7 @@
1382
2388
string containing a password prompt, and the third is the maximum
1383
2389
password length. Return the string containing the password.
1384
2390
</entry>
2391
+
<entry>Removed as of PHP 7.3.0.</entry>
1385
2392
</row>
1386
2393
<row>
1387
2394
<entry valign="top"><constant>CURLOPT_PROGRESSFUNCTION</constant></entry>
...
...
@@ -1406,6 +2413,7 @@
1406
2413
error.
1407
2414
</para>
1408
2415
</entry>
2416
+
<entry></entry>
1409
2417
</row>
1410
2418
<row>
1411
2419
<entry valign="top"><constant>CURLOPT_READFUNCTION</constant></entry>
...
...
@@ -1419,6 +2427,7 @@
1419
2427
typically by reading it from the passed stream resource. It should
1420
2428
return an empty string to signal <literal>EOF</literal>.
1421
2429
</entry>
2430
+
<entry></entry>
1422
2431
</row>
1423
2432
<row>
1424
2433
<entry valign="top"><constant>CURLOPT_WRITEFUNCTION</constant></entry>
...
...
@@ -1429,6 +2438,18 @@
1429
2438
this callback. It must return the exact number of bytes written
1430
2439
or the transfer will be aborted with an error.
1431
2440
</entry>
2441
+
<entry></entry>
2442
+
</row>
2443
+
<row>
2444
+
<entry valign="top"><constant>CURLOPT_XFERINFOFUNCTION</constant></entry>
2445
+
<entry valign="top">
2446
+
A callback accepting two parameters.
2447
+
Has a similar purpose as <constant>CURLOPT_PROGRESSFUNCTION</constant> but is more modern
2448
+
and the preferred option from cURL.
2449
+
</entry>
2450
+
<entry valign="top">
2451
+
Added in 7.32.0. Available as of PHP 8.2.0.
2452
+
</entry>
1432
2453
</row>
1433
2454
</tbody>
1434
2455
</tgroup>
...
...
@@ -1481,66 +2502,62 @@
1481
2502
</row>
1482
2503
</thead>
1483
2504
<tbody>
2505
+
&curl.changelog.handle-param;
1484
2506
<row>
1485
-
<entry>5.6.0</entry>
1486
-
<entry>
1487
-
<constant>CURLOPT_SAFE_UPLOAD</constant> is now &true; by default.
1488
-
</entry>
1489
-
</row>
1490
-
<row>
1491
-
<entry>5.6.0</entry>
1492
-
<entry>
1493
-
Removed <constant>CURLOPT_CLOSEPOLICY</constant> and associated values.
1494
-
</entry>
1495
-
</row>
1496
-
<row>
1497
-
<entry>5.5.0</entry>
1498
-
<entry>
1499
-
Added the cURL resource as the first argument to the
1500
-
<constant>CURLOPT_PROGRESSFUNCTION</constant> callback.
1501
-
</entry>
1502
-
</row>
1503
-
<row>
1504
-
<entry>5.5.0</entry>
1505
-
<entry>
1506
-
Introduced <constant>CURLOPT_SHARE</constant>.
1507
-
</entry>
1508
-
</row>
1509
-
<row>
1510
-
<entry>5.3.0</entry>
2507
+
<entry>7.3.15, 7.4.3</entry>
1511
2508
<entry>
1512
-
Introduced <constant>CURLOPT_PROGRESSFUNCTION</constant>.
2509
+
Introduced <constant>CURLOPT_HTTP09_ALLOWED</constant>.
1513
2510
</entry>
1514
2511
</row>
1515
2512
<row>
1516
-
<entry>5.2.10</entry>
2513
+
<entry>7.3.0</entry>
1517
2514
<entry>
1518
-
Introduced <constant>CURLOPT_PROTOCOLS</constant>, and
1519
-
<constant>CURLOPT_REDIR_PROTOCOLS</constant>.
2515
+
Introduced <constant>CURLOPT_ABSTRACT_UNIX_SOCKET</constant>, <constant>CURLOPT_KEEP_SENDING_ON_ERROR</constant>,
2516
+
<constant>CURLOPT_PRE_PROXY</constant>, <constant>CURLOPT_PROXY_CAINFO</constant>,
2517
+
<constant>CURLOPT_PROXY_CAPATH</constant>, <constant>CURLOPT_PROXY_CRLFILE</constant>,
2518
+
<constant>CURLOPT_PROXY_KEYPASSWD</constant>, <constant>CURLOPT_PROXY_PINNEDPUBLICKEY</constant>,
2519
+
<constant>CURLOPT_PROXY_SSLCERT</constant>, <constant>CURLOPT_PROXY_SSLCERTTYPE</constant>,
2520
+
<constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant>, <constant>CURLOPT_PROXY_SSLKEY</constant>,
2521
+
<constant>CURLOPT_PROXY_SSLKEYTYPE</constant>, <constant>CURLOPT_PROXY_SSL_OPTIONS</constant>,
2522
+
<constant>CURLOPT_PROXY_SSL_VERIFYHOST</constant>, <constant>CURLOPT_PROXY_SSL_VERIFYPEER</constant>,
2523
+
<constant>CURLOPT_PROXY_SSLVERSION</constant>, <constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant>,
2524
+
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant>, <constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant>,
2525
+
<constant>CURLOPT_SOCKS5_AUTH</constant>, <constant>CURLOPT_SUPPRESS_CONNECT_HEADERS</constant>,
2526
+
<constant>CURLOPT_DISALLOW_USERNAME_IN_URL</constant>, <constant>CURLOPT_DNS_SHUFFLE_ADDRESSES</constant>,
2527
+
<constant>CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS</constant>, <constant>CURLOPT_HAPROXYPROTOCOL</constant>,
2528
+
<constant>CURLOPT_PROXY_TLS13_CIPHERS</constant>, <constant>CURLOPT_SSH_COMPRESSION</constant>,
2529
+
<constant>CURLOPT_TIMEVALUE_LARGE</constant> and <constant>CURLOPT_TLS13_CIPHERS</constant>.
1520
2530
</entry>
1521
2531
</row>
1522
2532
<row>
1523
-
<entry>5.1.0</entry>
2533
+
<entry>7.0.7</entry>
1524
2534
<entry>
1525
-
Introduced <constant>CURLOPT_AUTOREFERER</constant>,
1526
-
<constant>CURLOPT_BINARYTRANSFER</constant>,
1527
-
<constant>CURLOPT_FTPSSLAUTH</constant>,
1528
-
<constant>CURLOPT_PROXYAUTH</constant>, and
1529
-
<constant>CURLOPT_TIMECONDITION</constant>.
1530
-
</entry>
1531
-
</row>
1532
-
<row>
1533
-
<entry>5.0.0</entry>
1534
-
<entry>
1535
-
Introduced <constant>CURLOPT_FTP_USE_EPRT</constant>,
1536
-
<constant>CURLOPT_NOSIGNAL</constant>,
1537
-
<constant>CURLOPT_UNRESTRICTED_AUTH</constant>,
1538
-
<constant>CURLOPT_BUFFERSIZE</constant>,
1539
-
<constant>CURLOPT_HTTPAUTH</constant>,
1540
-
<constant>CURLOPT_PROXYPORT</constant>,
1541
-
<constant>CURLOPT_PROXYTYPE</constant>,
1542
-
<constant>CURLOPT_SSLCERTTYPE</constant>, and
1543
-
<constant>CURLOPT_HTTP200ALIASES</constant>.
2535
+
Introduced <constant>CURL_HTTP_VERSION_2</constant>, <constant>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</constant>,
2536
+
<constant>CURL_HTTP_VERSION_2TLS</constant>, <constant>CURL_REDIR_POST_301</constant>,
2537
+
<constant>CURL_REDIR_POST_302</constant>, <constant>CURL_REDIR_POST_303</constant>,
2538
+
<constant>CURL_REDIR_POST_ALL</constant>, <constant>CURL_VERSION_KERBEROS5</constant>,
2539
+
<constant>CURL_VERSION_PSL</constant>, <constant>CURL_VERSION_UNIX_SOCKETS</constant>,
2540
+
<constant>CURLAUTH_NEGOTIATE</constant>, <constant>CURLAUTH_NTLM_WB</constant>,
2541
+
<constant>CURLFTP_CREATE_DIR</constant>, <constant>CURLFTP_CREATE_DIR_NONE</constant>,
2542
+
<constant>CURLFTP_CREATE_DIR_RETRY</constant>, <constant>CURLHEADER_SEPARATE</constant>,
2543
+
<constant>CURLHEADER_UNIFIED</constant>, <constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant>,
2544
+
<constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant>, <constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant>,
2545
+
<constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant>, <constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant>,
2546
+
<constant>CURLOPT_CONNECT_TO</constant>, <constant>CURLOPT_DEFAULT_PROTOCOL</constant>,
2547
+
<constant>CURLOPT_DNS_INTERFACE</constant>, <constant>CURLOPT_DNS_LOCAL_IP4</constant>,
2548
+
<constant>CURLOPT_DNS_LOCAL_IP6</constant>, <constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant>,
2549
+
<constant>CURLOPT_HEADEROPT</constant>, <constant>CURLOPT_LOGIN_OPTIONS</constant>,
2550
+
<constant>CURLOPT_PATH_AS_IS</constant>, <constant>CURLOPT_PINNEDPUBLICKEY</constant>,
2551
+
<constant>CURLOPT_PIPEWAIT</constant>, <constant>CURLOPT_PROXY_SERVICE_NAME</constant>,
2552
+
<constant>CURLOPT_PROXYHEADER</constant>, <constant>CURLOPT_SASL_IR</constant>,
2553
+
<constant>CURLOPT_SERVICE_NAME</constant>, <constant>CURLOPT_SSL_ENABLE_ALPN</constant>,
2554
+
<constant>CURLOPT_SSL_ENABLE_NPN</constant>, <constant>CURLOPT_SSL_FALSESTART</constant>,
2555
+
<constant>CURLOPT_SSL_VERIFYSTATUS</constant>, <constant>CURLOPT_STREAM_WEIGHT</constant>,
2556
+
<constant>CURLOPT_TCP_FASTOPEN</constant>, <constant>CURLOPT_TFTP_NO_OPTIONS</constant>,
2557
+
<constant>CURLOPT_UNIX_SOCKET_PATH</constant>, <constant>CURLOPT_XOAUTH2_BEARER</constant>,
2558
+
<constant>CURLPROTO_SMB</constant>, <constant>CURLPROTO_SMBS</constant>,
2559
+
<constant>CURLPROXY_HTTP_1_0</constant>, <constant>CURLSSH_AUTH_AGENT</constant> and
2560
+
<constant>CURLSSLOPT_NO_REVOKE</constant>.
1544
2561
</entry>
1545
2562
</row>
1546
2563
</tbody>
...
...
@@ -1574,55 +2591,6 @@ curl_close($ch);
1574
2591
</programlisting>
1575
2592
</example>
1576
2593
</para>
1577
-
<para>
1578
-
<example>
1579
-
<title>Uploading file (deprecated as of PHP 5.5.0)</title>
1580
-
<programlisting role="php">
1581
-
<![CDATA[
1582
-
<?php
1583
-

1584
-
/* http://localhost/upload.php:
1585
-
print_r($_POST);
1586
-
print_r($_FILES);
1587
-
*/
1588
-

1589
-
$ch = curl_init();
1590
-

1591
-
$data = array('name' => 'Foo', 'file' => '@/home/user/test.png');
1592
-

1593
-
curl_setopt($ch, CURLOPT_URL, 'http://localhost/upload.php');
1594
-
curl_setopt($ch, CURLOPT_POST, 1);
1595
-
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); // required as of PHP 5.6.0
1596
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
1597
-

1598
-
curl_exec($ch);
1599
-
?>
1600
-
]]>
1601
-
</programlisting>
1602
-
&example.outputs;
1603
-
<screen>
1604
-
<![CDATA[
1605
-
Array
1606
-
(
1607
-
[name] => Foo
1608
-
)
1609
-
Array
1610
-
(
1611
-
[file] => Array
1612
-
(
1613
-
[name] => test.png
1614
-
[type] => image/png
1615
-
[tmp_name] => /tmp/phpcpjNeQ
1616
-
[error] => 0
1617
-
[size] => 279
1618
-
)
1619
-

1620
-
)
1621
-

1622
-
]]>
1623
-
</screen>
1624
-
</example>
1625
-
</para>
1626
2594
</refsect1>
1627
2595
1628
2596
<refsect1 role="notes">
...
...
@@ -1642,12 +2610,13 @@ Array
1642
2610
<para>
1643
2611
<simplelist>
1644
2612
<member><function>curl_setopt_array</function></member>
2613
+
<member><classname>CURLFile</classname></member>
2614
+
<member><classname>CURLStringFile</classname></member>
1645
2615
</simplelist>
1646
2616
</para>
1647
2617
</refsect1>
1648
2618
1649
2619
</refentry>
1650
-

1651
2620
<!-- Keep this comment at the end of the file
1652
2621
Local variables:
1653
2622
mode: sgml
1654
2623