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>
...
...
@@ -203,9 +189,8 @@
203
189
<entry valign="top">
204
190
&true; to follow any
205
191
<literal>"Location: "</literal> header that the server sends as
206
-
part of the HTTP header (note this is recursive, PHP will follow as
207
-
many <literal>"Location: "</literal> headers that it is sent,
208
-
unless <constant>CURLOPT_MAXREDIRS</constant> is set).
192
+
part of the HTTP header.
193
+
See also <constant>CURLOPT_MAXREDIRS</constant>.
209
194
</entry>
210
195
<entry valign="top">
211
196
</entry>
...
...
@@ -273,7 +258,7 @@
273
258
the number of small packets on the network.
274
259
</entry>
275
260
<entry valign="top">
276
-
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
277
262
greater.
278
263
</entry>
279
264
</row>
...
...
@@ -309,18 +294,18 @@
309
294
&true; to track the handle's request string.
310
295
</entry>
311
296
<entry valign="top">
312
-
Available since PHP 5.1.3. The <constant>CURLINFO_</constant>
297
+
The <constant>CURLINFO_</constant>
313
298
prefix is intentional.
314
299
</entry>
315
300
</row>
316
301
<row>
317
-
<entry valign="top"><constant>CURLOPT_HTTP09_ALLOWED </constant></entry>
302
+
<entry valign="top"><constant>CURLOPT_HTTP09_ALLOWED</constant></entry>
318
303
<entry valign="top">
319
304
Whether to allow HTTP/0.9 responses. Defaults to &false; as of libcurl 7.66.0;
320
305
formerly it defaulted to &true;.
321
306
</entry>
322
307
<entry valign="top">
323
-
Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl >= 7.64.0
308
+
Available since PHP 7.3.15 and 7.4.3, respectively, if built against libcurl &gt;= 7.64.0
324
309
</entry>
325
310
</row>
326
311
<row>
...
...
@@ -347,7 +332,7 @@
347
332
&false; to get the raw HTTP response body.
348
333
</entry>
349
334
<entry valign="top">
350
-
Available as of PHP 5.5.0 if built against libcurl >= 7.16.2.
335
+
Available if built against libcurl &gt;= 7.16.2.
351
336
</entry>
352
337
</row>
353
338
<row>
...
...
@@ -359,7 +344,7 @@
359
344
Most applications do not need this option.
360
345
</entry>
361
346
<entry valign="top">
362
-
Available as of PHP 7.3.0 if built against libcurl >= 7.51.0.
347
+
Available as of PHP 7.3.0 if built against libcurl &gt;= 7.51.0.
363
348
</entry>
364
349
</row>
365
350
<row>
...
...
@@ -466,21 +451,6 @@
466
451
</entry>
467
452
</row>
468
453
<row>
469
-
<entry valign="top"><constant>CURLOPT_SAFE_UPLOAD</constant></entry>
470
-
<entry valign="top">
471
-
&true; to disable support for the <literal>@</literal> prefix for
472
-
uploading files in <constant>CURLOPT_POSTFIELDS</constant>, which
473
-
means that values starting with <literal>@</literal> can be safely
474
-
passed as fields. <classname>CURLFile</classname> may be used for
475
-
uploads instead.
476
-
</entry>
477
-
<entry valign="top">
478
-
Added in PHP 5.5.0 with &false; as the default value. PHP 5.6.0
479
-
changes the default value to &true;. PHP 7 removes this option;
480
-
the CURLFile interface must be used to upload files.
481
-
</entry>
482
-
</row>
483
-
<row>
484
454
<entry valign="top"><constant>CURLOPT_SASL_IR</constant></entry>
485
455
<entry valign="top">
486
456
&true; to enable sending the initial response in the first packet.
...
...
@@ -545,7 +515,19 @@
545
515
When set to false, the peer certificate verification succeeds regardless.
546
516
</entry>
547
517
<entry valign="top">
548
-
&true; by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
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">
549
531
</entry>
550
532
</row>
551
533
<row>
...
...
@@ -582,7 +564,7 @@
582
564
<entry valign="top">
583
565
&true; to use ASCII mode for FTP transfers.
584
566
For LDAP, it retrieves data in plain text instead of HTML. On
585
-
Windows systems, it will not set <literal>STDOUT</literal> to binary
567
+
Windows systems, it will not set <constant>STDOUT</constant> to binary
586
568
mode.
587
569
</entry>
588
570
<entry valign="top">
...
...
@@ -611,7 +593,7 @@
611
593
<entry valign="top"><constant>CURLOPT_VERBOSE</constant></entry>
612
594
<entry valign="top">
613
595
&true; to output verbose information. Writes
614
-
output to <literal>STDERR</literal>, or the file specified using
596
+
output to <constant>STDERR</constant>, or the file specified using
615
597
<constant>CURLOPT_STDERR</constant>.
616
598
</entry>
617
599
<entry valign="top">
...
...
@@ -622,7 +604,7 @@
622
604
</informaltable>
623
605
</para>
624
606
<para>
625
-
<parameter>value</parameter> should be an <type>integer</type> for the
607
+
<parameter>value</parameter> should be an <type>int</type> for the
626
608
following values of the <parameter>option</parameter> parameter:
627
609
<informaltable>
628
610
<tgroup cols="3">
...
...
@@ -645,21 +627,6 @@
645
627
</entry>
646
628
</row>
647
629
<row>
648
-
<entry valign="top"><constant>CURLOPT_CLOSEPOLICY</constant></entry>
649
-
<entry valign="top">
650
-
One of the <constant>CURLCLOSEPOLICY_*</constant> values.
651
-
<note>
652
-
<para>
653
-
This option is deprecated, as it was never implemented in cURL and
654
-
never had any effect.
655
-
</para>
656
-
</note>
657
-
</entry>
658
-
<entry valign="top">
659
-
Removed in PHP 5.6.0.
660
-
</entry>
661
-
</row>
662
-
<row>
663
630
<entry><constant>CURLOPT_CONNECTTIMEOUT</constant></entry>
664
631
<entry valign="top">
665
632
The number of seconds to wait while trying to connect. Use 0 to
...
...
@@ -679,7 +646,7 @@
679
646
timeouts with a minimum timeout allowed of one second.
680
647
</entry>
681
648
<entry valign="top">
682
-
Added in cURL 7.16.2. Available since PHP 5.2.3.
649
+
Added in cURL 7.16.2.
683
650
</entry>
684
651
</row>
685
652
<row>
...
...
@@ -694,7 +661,7 @@
694
661
<row>
695
662
<entry valign="top"><constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant></entry>
696
663
<entry valign="top">
697
-
The timeout for Expect: 100-continue responses in milliseconds.
664
+
The timeout for <literal>Expect: 100-continue</literal> responses in milliseconds.
698
665
Defaults to 1000 milliseconds.
699
666
</entry>
700
667
<entry valign="top">
...
...
@@ -717,9 +684,9 @@
717
684
<entry valign="top"><constant>CURLOPT_FTPSSLAUTH</constant></entry>
718
685
<entry valign="top">
719
686
The FTP authentication method (when is activated):
720
-
<literal>CURLFTPAUTH_SSL</literal> (try SSL first),
721
-
<literal>CURLFTPAUTH_TLS</literal> (try TLS first), or
722
-
<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).
723
690
</entry>
724
691
<entry valign="top">
725
692
Added in cURL 7.12.2.
...
...
@@ -763,7 +730,7 @@
763
730
<constant>CURL_HTTP_VERSION_1_0</constant> (forces HTTP/1.0),
764
731
<constant>CURL_HTTP_VERSION_1_1</constant> (forces HTTP/1.1),
765
732
<constant>CURL_HTTP_VERSION_2_0</constant> (attempts HTTP 2),
766
-
<constant>CURL_HTTP_VERSION_2 </constant> (alias of <constant>CURL_HTTP_VERSION_2_0</constant>),
733
+
<constant>CURL_HTTP_VERSION_2</constant> (alias of <constant>CURL_HTTP_VERSION_2_0</constant>),
767
734
<constant>CURL_HTTP_VERSION_2TLS</constant> (attempts HTTP 2 over TLS (HTTPS) only) or
768
735
<constant>CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE</constant> (issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade).
769
736
</entry>
...
...
@@ -779,6 +746,7 @@
779
746
<constant>CURLAUTH_DIGEST</constant>,
780
747
<constant>CURLAUTH_GSSNEGOTIATE</constant>,
781
748
<constant>CURLAUTH_NTLM</constant>,
749
+
<constant>CURLAUTH_AWS_SIGV4</constant>,
782
750
<constant>CURLAUTH_ANY</constant>, and
783
751
<constant>CURLAUTH_ANYSAFE</constant>.
784
752
</para>
...
...
@@ -788,12 +756,12 @@
788
756
what methods it supports and pick the best one.
789
757
</para>
790
758
<para>
791
-
<constant>CURLAUTH_ANY</constant> is an alias for
792
-
<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.
793
761
</para>
794
762
<para>
795
-
<constant>CURLAUTH_ANYSAFE</constant> is an alias for
796
-
<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.
797
765
</para>
798
766
</entry>
799
767
<entry valign="top">
...
...
@@ -831,12 +799,56 @@
831
799
</entry>
832
800
</row>
833
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>
834
847
<entry valign="top"><constant>CURLOPT_MAXCONNECTS</constant></entry>
835
848
<entry valign="top">
836
849
The maximum amount of persistent connections that are allowed.
837
-
When the limit is reached,
838
-
<constant>CURLOPT_CLOSEPOLICY</constant> is used to determine
839
-
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.
840
852
</entry>
841
853
<entry valign="top">
842
854
</entry>
...
...
@@ -846,6 +858,9 @@
846
858
<entry valign="top">
847
859
The maximum amount of HTTP redirections to follow. Use this option
848
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.
849
864
</entry>
850
865
<entry valign="top">
851
866
</entry>
...
...
@@ -867,7 +882,7 @@
867
882
specific type of redirect occurs.
868
883
</entry>
869
884
<entry valign="top">
870
-
Added in cURL 7.19.1. Available since PHP 5.3.2.
885
+
Added in cURL 7.19.1.
871
886
</entry>
872
887
</row>
873
888
<row>
...
...
@@ -895,6 +910,7 @@
895
910
<constant>CURLPROTO_DICT</constant>,
896
911
<constant>CURLPROTO_FILE</constant>,
897
912
<constant>CURLPROTO_TFTP</constant>,
913
+
<constant>CURLPROTO_MQTT</constant>,
898
914
<constant>CURLPROTO_ALL</constant>
899
915
</para>
900
916
</entry>
...
...
@@ -990,7 +1006,7 @@
990
1006
</para>
991
1007
</entry>
992
1008
<entry valign="top">
993
-
Available as of 7.3.0 and curl >= 7.55.0.
1009
+
Available as of 7.3.0 and curl &gt;= 7.55.0.
994
1010
</entry>
995
1011
</row>
996
1012
<row>
...
...
@@ -1006,6 +1022,29 @@
1006
1022
revocation checks for those SSL backends where such behavior is
1007
1023
present.
1008
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>
1009
1048
</entry>
1010
1049
<entry valign="top">
1011
1050
Added in cURL 7.25.0. Available since PHP 7.0.7.
...
...
@@ -1014,10 +1053,11 @@
1014
1053
<row>
1015
1054
<entry valign="top"><constant>CURLOPT_SSL_VERIFYHOST</constant></entry>
1016
1055
<entry valign="top">
1017
-
<literal>1</literal> to check the existence of a common name in the
1018
-
SSL peer certificate. <literal>2</literal> to check the existence of
1019
-
a common name and also verify that it matches the hostname
1020
-
provided. <literal>0</literal> to not check the names. In production environments the value of this option
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
1021
1061
should be kept at <literal>2</literal> (default value).
1022
1062
</entry>
1023
1063
<entry valign="top">
...
...
@@ -1032,8 +1072,9 @@
1032
1072
<constant>CURL_SSLVERSION_SSLv2</constant> (2),
1033
1073
<constant>CURL_SSLVERSION_SSLv3</constant> (3),
1034
1074
<constant>CURL_SSLVERSION_TLSv1_0</constant> (4),
1035
-
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5) or
1036
-
<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).
1037
1078
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_*</constant>
1038
1079
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_*</constant>
1039
1080
constants with one of the <constant>CURL_SSLVERSION_MAX_*</constant> constants.
...
...
@@ -1064,15 +1105,15 @@
1064
1105
<simpara>
1065
1106
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
1066
1107
revocation checks for those SSL backends where such behavior is
1067
-
present. (curl >= 7.44.0)
1108
+
present. (curl &gt;= 7.44.0)
1068
1109
</simpara>
1069
1110
<simpara>
1070
1111
<constant>CURLSSLOPT_NO_PARTIALCHAIN</constant>: do not accept "partial"
1071
-
certificate chains, which it otherwise does by default. (curl >= 7.68.0)
1112
+
certificate chains, which it otherwise does by default. (curl &gt;= 7.68.0)
1072
1113
</simpara>
1073
1114
</entry>
1074
1115
<entry valign="top">
1075
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1116
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1076
1117
</entry>
1077
1118
</row>
1078
1119
<row>
...
...
@@ -1087,7 +1128,7 @@
1087
1128
In production environments the value of this option should be kept at <literal>2</literal> (default value).
1088
1129
</entry>
1089
1130
<entry valign="top">
1090
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1131
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1091
1132
</entry>
1092
1133
</row>
1093
1134
<row>
...
...
@@ -1113,7 +1154,7 @@
1113
1154
</note>
1114
1155
</entry>
1115
1156
<entry valign="top">
1116
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1157
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1117
1158
</entry>
1118
1159
</row>
1119
1160
<row>
...
...
@@ -1134,7 +1175,7 @@
1134
1175
supports them. If set to <literal>0</literal> (default) keepalive probes are disabled.
1135
1176
</entry>
1136
1177
<entry valign="top">
1137
-
Added in cURL 7.25.0. Available since PHP 5.5.0.
1178
+
Added in cURL 7.25.0.
1138
1179
</entry>
1139
1180
</row>
1140
1181
<row>
...
...
@@ -1146,7 +1187,7 @@
1146
1187
The default is <literal>60</literal>.
1147
1188
</entry>
1148
1189
<entry valign="top">
1149
-
Added in cURL 7.25.0. Available since PHP 5.5.0.
1190
+
Added in cURL 7.25.0.
1150
1191
</entry>
1151
1192
</row>
1152
1193
<row>
...
...
@@ -1158,7 +1199,7 @@
1158
1199
The default is <literal>60</literal>.
1159
1200
</entry>
1160
1201
<entry valign="top">
1161
-
Added in cURL 7.25.0. Available since PHP 5.5.0.
1202
+
Added in cURL 7.25.0.
1162
1203
</entry>
1163
1204
</row>
1164
1205
<row>
...
...
@@ -1171,10 +1212,13 @@
1171
1212
a <literal>"304 Not Modified"</literal> header will be returned
1172
1213
assuming <constant>CURLOPT_HEADER</constant> is &true;.
1173
1214
Use <constant>CURL_TIMECOND_IFUNMODSINCE</constant> for the reverse
1174
-
effect. <constant>CURL_TIMECOND_IFMODSINCE</constant> is the
1175
-
default.
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.
1176
1218
</entry>
1177
1219
<entry valign="top">
1220
+
Before cURL 7.46.0 the default was
1221
+
<constant>CURL_TIMECOND_IFMODSINCE</constant>.
1178
1222
</entry>
1179
1223
</row>
1180
1224
<row>
...
...
@@ -1196,15 +1240,14 @@
1196
1240
timeouts with a minimum timeout allowed of one second.
1197
1241
</entry>
1198
1242
<entry valign="top">
1199
-
Added in cURL 7.16.2. Available since PHP 5.2.3.
1243
+
Added in cURL 7.16.2.
1200
1244
</entry>
1201
1245
</row>
1202
1246
<row>
1203
1247
<entry valign="top"><constant>CURLOPT_TIMEVALUE</constant></entry>
1204
1248
<entry valign="top">
1205
1249
The time in seconds since January 1st, 1970. The time will be used
1206
-
by <constant>CURLOPT_TIMECONDITION</constant>. By default,
1207
-
<constant>CURL_TIMECOND_IFMODSINCE</constant> is used.
1250
+
by <constant>CURLOPT_TIMECONDITION</constant>.
1208
1251
</entry>
1209
1252
<entry valign="top">
1210
1253
</entry>
...
...
@@ -1223,6 +1266,28 @@
1223
1266
</entry>
1224
1267
</row>
1225
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>
1226
1291
<entry valign="top"><constant>CURLOPT_MAX_RECV_SPEED_LARGE</constant></entry>
1227
1292
<entry valign="top">
1228
1293
If a download exceeds this speed (counted in bytes per second) on
...
...
@@ -1231,7 +1296,7 @@
1231
1296
Defaults to unlimited speed.
1232
1297
</entry>
1233
1298
<entry valign="top">
1234
-
Added in cURL 7.15.5. Available since PHP 5.4.0.
1299
+
Added in cURL 7.15.5.
1235
1300
</entry>
1236
1301
</row>
1237
1302
<row>
...
...
@@ -1243,7 +1308,7 @@
1243
1308
Defaults to unlimited speed.
1244
1309
</entry>
1245
1310
<entry valign="top">
1246
-
Added in cURL 7.15.5. Available since PHP 5.4.0.
1311
+
Added in cURL 7.15.5.
1247
1312
</entry>
1248
1313
</row>
1249
1314
<row>
...
...
@@ -1279,12 +1344,13 @@
1279
1344
<entry valign="top"><constant>CURLOPT_FTP_FILEMETHOD</constant></entry>
1280
1345
<entry valign="top">
1281
1346
Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
1347
+
<constant>CURLFTPMETHOD_DEFAULT</constant>,
1282
1348
<constant>CURLFTPMETHOD_MULTICWD</constant>,
1283
-
<constant>CURLFTPMETHOD_NOCWD</constant> and
1349
+
<constant>CURLFTPMETHOD_NOCWD</constant>, and
1284
1350
<constant>CURLFTPMETHOD_SINGLECWD</constant>.
1285
1351
</entry>
1286
1352
<entry valign="top">
1287
-
Added in cURL 7.15.1. Available since PHP 5.3.0.
1353
+
Added in cURL 7.15.1.
1288
1354
</entry>
1289
1355
</row>
1290
1356
</tbody>
...
...
@@ -1319,6 +1385,45 @@
1319
1385
</entry>
1320
1386
</row>
1321
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>
1322
1427
<entry valign="top"><constant>CURLOPT_CAINFO</constant></entry>
1323
1428
<entry valign="top">
1324
1429
The name of a file holding one or more certificates to verify the
...
...
@@ -1330,6 +1435,16 @@
1330
1435
</entry>
1331
1436
</row>
1332
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>
1333
1448
<entry valign="top"><constant>CURLOPT_CAPATH</constant></entry>
1334
1449
<entry valign="top">
1335
1450
A directory that holds multiple CA certificates. Use this option
...
...
@@ -1381,7 +1496,7 @@
1381
1496
<literal>"RELOAD"</literal> loads all cookies from the files specified by <constant>CURLOPT_COOKIEFILE</constant>.
1382
1497
</entry>
1383
1498
<entry valign="top">
1384
-
Available since PHP 5.5.0 and cURL 7.14.1.
1499
+
Available since cURL 7.14.1.
1385
1500
</entry>
1386
1501
</row>
1387
1502
<row>
...
...
@@ -1481,6 +1596,29 @@
1481
1596
</entry>
1482
1597
</row>
1483
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>
1484
1622
<entry valign="top"><constant>CURLOPT_INTERFACE</constant></entry>
1485
1623
<entry valign="top">
1486
1624
The name of the outgoing network interface to use. This can be an
...
...
@@ -1546,10 +1684,7 @@
1546
1684
<entry valign="top">
1547
1685
<simpara>
1548
1686
The full data to post in a HTTP "POST" operation.
1549
-
To post a file, prepend a filename with <literal>@</literal> and
1550
-
use the full path. The filetype can be explicitly specified by
1551
-
following the filename with the type in the format
1552
-
'<literal>;type=mimetype</literal>'. This parameter can either be
1687
+
This parameter can either be
1553
1688
passed as a urlencoded string like '<literal>para1=val1&amp;para2=val2&amp;...</literal>'
1554
1689
or as an array with the field name as key and field data as value.
1555
1690
If <parameter>value</parameter> is an array, the
...
...
@@ -1557,15 +1692,8 @@
1557
1692
<literal>multipart/form-data</literal>.
1558
1693
</simpara>
1559
1694
<simpara>
1560
-
As of PHP 5.2.0, <parameter>value</parameter> must be an array if
1561
-
files are passed to this option with the <literal>@</literal> prefix.
1562
-
</simpara>
1563
-
<simpara>
1564
-
As of PHP 5.5.0, the <literal>@</literal> prefix is deprecated and
1565
-
files can be sent using <classname>CURLFile</classname>. The
1566
-
<literal>@</literal> prefix can be disabled for safe passing of
1567
-
values beginning with <literal>@</literal> by setting the
1568
-
<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.
1569
1697
</simpara>
1570
1698
</entry>
1571
1699
<entry valign="top">
...
...
@@ -1602,7 +1730,7 @@
1602
1730
Defaults to using port 1080 for proxies if a port is not specified.
1603
1731
</entry>
1604
1732
<entry valign="top">
1605
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1733
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1606
1734
</entry>
1607
1735
</row>
1608
1736
<row>
...
...
@@ -1619,7 +1747,8 @@
1619
1747
The proxy authentication service name.
1620
1748
</entry>
1621
1749
<entry valign="top">
1622
-
Added in cURL 7.34.0. Available since PHP 7.0.7.
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.
1623
1752
</entry>
1624
1753
</row>
1625
1754
<row>
...
...
@@ -1633,7 +1762,19 @@
1633
1762
to be stored.
1634
1763
</entry>
1635
1764
<entry valign="top">
1636
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
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.
1637
1778
</entry>
1638
1779
</row>
1639
1780
<row>
...
...
@@ -1642,7 +1783,7 @@
1642
1783
The directory holding multiple CA certificates to verify the HTTPS proxy with.
1643
1784
</entry>
1644
1785
<entry valign="top">
1645
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1786
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1646
1787
</entry>
1647
1788
</row>
1648
1789
<row>
...
...
@@ -1653,7 +1794,7 @@
1653
1794
the SSL exchange.
1654
1795
</entry>
1655
1796
<entry valign="top">
1656
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1797
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1657
1798
</entry>
1658
1799
</row>
1659
1800
<row>
...
...
@@ -1665,7 +1806,7 @@
1665
1806
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1666
1807
</entry>
1667
1808
<entry valign="top">
1668
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1809
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1669
1810
</entry>
1670
1811
</row>
1671
1812
<row>
...
...
@@ -1677,7 +1818,7 @@
1677
1818
"sha256//" and separated by ";"
1678
1819
</entry>
1679
1820
<entry valign="top">
1680
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1821
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1681
1822
</entry>
1682
1823
</row>
1683
1824
<row>
...
...
@@ -1692,7 +1833,7 @@
1692
1833
"./" prefix, in order to avoid confusion with a nickname.
1693
1834
</entry>
1694
1835
<entry valign="top">
1695
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1836
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1696
1837
</entry>
1697
1838
</row>
1698
1839
<row>
...
...
@@ -1705,7 +1846,7 @@
1705
1846
PKCS#12-encoded files. Defaults to "PEM".
1706
1847
</entry>
1707
1848
<entry valign="top">
1708
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1849
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1709
1850
</entry>
1710
1851
</row>
1711
1852
<row>
...
...
@@ -1717,7 +1858,7 @@
1717
1858
but colons are normally used, !, - and + can be used as operators.
1718
1859
</entry>
1719
1860
<entry valign="top">
1720
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1861
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1721
1862
</entry>
1722
1863
</row>
1723
1864
<row>
...
...
@@ -1731,7 +1872,7 @@
1731
1872
TLS 1.3 cipher suites by using the <constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant> option.
1732
1873
</entry>
1733
1874
<entry valign="top">
1734
-
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
1875
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.61.0. Available when built with OpenSSL &gt;= 1.1.1.
1735
1876
</entry>
1736
1877
</row>
1737
1878
<row>
...
...
@@ -1743,7 +1884,7 @@
1743
1884
(iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport.
1744
1885
</entry>
1745
1886
<entry valign="top">
1746
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled.
1887
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0. Available if built TLS enabled.
1747
1888
</entry>
1748
1889
</row>
1749
1890
<row>
...
...
@@ -1752,7 +1893,7 @@
1752
1893
The format of your private key. Supported formats are "PEM", "DER" and "ENG".
1753
1894
</entry>
1754
1895
<entry valign="top">
1755
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1896
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1756
1897
</entry>
1757
1898
</row>
1758
1899
<row>
...
...
@@ -1763,7 +1904,7 @@
1763
1904
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> option to also be set.
1764
1905
</entry>
1765
1906
<entry valign="top">
1766
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1907
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1767
1908
</entry>
1768
1909
</row>
1769
1910
<row>
...
...
@@ -1780,18 +1921,18 @@
1780
1921
</note>
1781
1922
</entry>
1782
1923
<entry valign="top">
1783
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1924
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1784
1925
</entry>
1785
1926
</row>
1786
1927
<row>
1787
1928
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant></entry>
1788
1929
<entry valign="top">
1789
-
Tusername to use for the HTTPS proxy TLS authentication method specified with the
1930
+
The username to use for the HTTPS proxy TLS authentication method specified with the
1790
1931
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
1791
1932
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> option to also be set.
1792
1933
</entry>
1793
1934
<entry valign="top">
1794
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1935
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.52.0.
1795
1936
</entry>
1796
1937
</row>
1797
1938
<row>
...
...
@@ -1833,6 +1974,17 @@
1833
1974
</entry>
1834
1975
</row>
1835
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>
1836
1988
<entry valign="top"><constant>CURLOPT_SERVICE_NAME</constant></entry>
1837
1989
<entry valign="top">
1838
1990
The authentication service name.
...
...
@@ -1854,6 +2006,15 @@
1854
2006
</entry>
1855
2007
</row>
1856
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>
1857
2018
<entry valign="top"><constant>CURLOPT_SSH_PUBLIC_KEYFILE</constant></entry>
1858
2019
<entry valign="top">
1859
2020
The file name for your public key. If not used, libcurl defaults to
...
...
@@ -1888,6 +2049,17 @@
1888
2049
</entry>
1889
2050
</row>
1890
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>
1891
2063
<entry valign="top"><constant>CURLOPT_SSLCERT</constant></entry>
1892
2064
<entry valign="top">
1893
2065
The name of a file containing a PEM formatted certificate.
...
...
@@ -1979,7 +2151,7 @@
1979
2151
TLS 1.3 cipher suites by using the <constant>CURLOPT_SSL_CIPHER_LIST</constant> option.
1980
2152
</entry>
1981
2153
<entry valign="top">
1982
-
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
2154
+
Available since PHP 7.3.0 and libcurl &gt;= cURL 7.61.0. Available when built with OpenSSL &gt;= 1.1.1.
1983
2155
</entry>
1984
2156
</row>
1985
2157
<row>
...
...
@@ -2016,7 +2188,16 @@
2016
2188
The user name to use in authentication.
2017
2189
</entry>
2018
2190
<entry valign="top">
2019
-
Added in cURL 7.19.1. Available since PHP 5.5.0.
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.
2020
2201
</entry>
2021
2202
</row>
2022
2203
<row>
...
...
@@ -2125,7 +2306,7 @@
2125
2306
</code>
2126
2307
</entry>
2127
2308
<entry valign="top">
2128
-
Added in cURL 7.21.3. Available since PHP 5.5.0.
2309
+
Added in cURL 7.21.3.
2129
2310
</entry>
2130
2311
</row>
2131
2312
</tbody>
...
...
@@ -2149,7 +2330,7 @@
2149
2330
<entry valign="top"><constant>CURLOPT_FILE</constant></entry>
2150
2331
<entry valign="top">
2151
2332
The file that the transfer should be written to. The default
2152
-
is <literal>STDOUT</literal> (the browser window).
2333
+
is <constant>STDOUT</constant> (the browser window).
2153
2334
</entry>
2154
2335
</row>
2155
2336
<row>
...
...
@@ -2162,7 +2343,7 @@
2162
2343
<entry valign="top"><constant>CURLOPT_STDERR</constant></entry>
2163
2344
<entry valign="top">
2164
2345
An alternative location to output errors to instead of
2165
-
<literal>STDERR</literal>.
2346
+
<constant>STDERR</constant>.
2166
2347
</entry>
2167
2348
</row>
2168
2349
<row>
...
...
@@ -2184,6 +2365,7 @@
2184
2365
<row>
2185
2366
<entry>Option</entry>
2186
2367
<entry>Set <parameter>value</parameter> to</entry>
2368
+
<entry>Notes</entry>
2187
2369
</row>
2188
2370
</thead>
2189
2371
<tbody>
...
...
@@ -2196,6 +2378,7 @@
2196
2378
be written by this callback. Return the number of
2197
2379
bytes written.
2198
2380
</entry>
2381
+
<entry></entry>
2199
2382
</row>
2200
2383
<row>
2201
2384
<entry valign="top"><constant>CURLOPT_PASSWDFUNCTION</constant></entry>
...
...
@@ -2205,6 +2388,7 @@
2205
2388
string containing a password prompt, and the third is the maximum
2206
2389
password length. Return the string containing the password.
2207
2390
</entry>
2391
+
<entry>Removed as of PHP 7.3.0.</entry>
2208
2392
</row>
2209
2393
<row>
2210
2394
<entry valign="top"><constant>CURLOPT_PROGRESSFUNCTION</constant></entry>
...
...
@@ -2229,6 +2413,7 @@
2229
2413
error.
2230
2414
</para>
2231
2415
</entry>
2416
+
<entry></entry>
2232
2417
</row>
2233
2418
<row>
2234
2419
<entry valign="top"><constant>CURLOPT_READFUNCTION</constant></entry>
...
...
@@ -2242,6 +2427,7 @@
2242
2427
typically by reading it from the passed stream resource. It should
2243
2428
return an empty string to signal <literal>EOF</literal>.
2244
2429
</entry>
2430
+
<entry></entry>
2245
2431
</row>
2246
2432
<row>
2247
2433
<entry valign="top"><constant>CURLOPT_WRITEFUNCTION</constant></entry>
...
...
@@ -2252,6 +2438,18 @@
2252
2438
this callback. It must return the exact number of bytes written
2253
2439
or the transfer will be aborted with an error.
2254
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>
2255
2453
</row>
2256
2454
</tbody>
2257
2455
</tgroup>
...
...
@@ -2304,10 +2502,11 @@
2304
2502
</row>
2305
2503
</thead>
2306
2504
<tbody>
2505
+
&curl.changelog.handle-param;
2307
2506
<row>
2308
2507
<entry>7.3.15, 7.4.3</entry>
2309
2508
<entry>
2310
-
Introduced <constant>CURLOPT_HTTP09_ALLOWED </constant>.
2509
+
Introduced <constant>CURLOPT_HTTP09_ALLOWED</constant>.
2311
2510
</entry>
2312
2511
</row>
2313
2512
<row>
...
...
@@ -2392,55 +2591,6 @@ curl_close($ch);
2392
2591
</programlisting>
2393
2592
</example>
2394
2593
</para>
2395
-
<para>
2396
-
<example>
2397
-
<title>Uploading file (deprecated as of PHP 5.5.0)</title>
2398
-
<programlisting role="php">
2399
-
<![CDATA[
2400
-
<?php
2401
-

2402
-
/* http://localhost/upload.php:
2403
-
print_r($_POST);
2404
-
print_r($_FILES);
2405
-
*/
2406
-

2407
-
$ch = curl_init();
2408
-

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

2411
-
curl_setopt($ch, CURLOPT_URL, 'http://localhost/upload.php');
2412
-
curl_setopt($ch, CURLOPT_POST, 1);
2413
-
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); // required as of PHP 5.6.0
2414
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
2415
-

2416
-
curl_exec($ch);
2417
-
?>
2418
-
]]>
2419
-
</programlisting>
2420
-
&example.outputs;
2421
-
<screen>
2422
-
<![CDATA[
2423
-
Array
2424
-
(
2425
-
[name] => Foo
2426
-
)
2427
-
Array
2428
-
(
2429
-
[file] => Array
2430
-
(
2431
-
[name] => test.png
2432
-
[type] => image/png
2433
-
[tmp_name] => /tmp/phpcpjNeQ
2434
-
[error] => 0
2435
-
[size] => 279
2436
-
)
2437
-

2438
-
)
2439
-

2440
-
]]>
2441
-
</screen>
2442
-
</example>
2443
-
</para>
2444
2594
</refsect1>
2445
2595
2446
2596
<refsect1 role="notes">
...
...
@@ -2460,12 +2610,13 @@ Array
2460
2610
<para>
2461
2611
<simplelist>
2462
2612
<member><function>curl_setopt_array</function></member>
2613
+
<member><classname>CURLFile</classname></member>
2614
+
<member><classname>CURLStringFile</classname></member>
2463
2615
</simplelist>
2464
2616
</para>
2465
2617
</refsect1>
2466
2618
2467
2619
</refentry>
2468
-

2469
2620
<!-- Keep this comment at the end of the file
2470
2621
Local variables:
2471
2622
mode: sgml
2472
2623