reference/curl/functions/curl-setopt.xml
0d3cf0dbf9bc908100103917f8485581c50bd36b
0d3cf0dbf9bc908100103917f8485581c50bd36b
...
...
@@ -28,7 +28,7 @@
28
28
<term><parameter>option</parameter></term>
29
29
<listitem>
30
30
<para>
31
-
The <literal>CURLOPT_XXX</literal> option to set.
31
+
The <constant>CURLOPT_<replaceable>*</replaceable></constant> option to set.
32
32
</para>
33
33
</listitem>
34
34
</varlistentry>
...
...
@@ -37,2219 +37,9 @@
37
37
<listitem>
38
38
<para>
39
39
The value to be set on <parameter>option</parameter>.
40
-
</para>
41
-
<para>
42
-
<parameter>value</parameter> should be a <type>bool</type> for the
43
-
following values of the <parameter>option</parameter> parameter:
44
-
<informaltable>
45
-
<tgroup cols="3">
46
-
<thead>
47
-
<row>
48
-
<entry valign="top">Option</entry>
49
-
<entry valign="top">Set <parameter>value</parameter> to</entry>
50
-
<entry valign="top">Notes</entry>
51
-
</row>
52
-
</thead>
53
-
<tbody>
54
-
<row>
55
-
<entry valign="top"><constant>CURLOPT_AUTOREFERER</constant></entry>
56
-
<entry valign="top">
57
-
&true; to automatically set the <literal>Referer:</literal> field in
58
-
requests where it follows a <literal>Location:</literal> redirect.
59
-
</entry>
60
-
<entry valign="top">
61
-
</entry>
62
-
</row>
63
-
<row>
64
-
<entry valign="top"><constant>CURLOPT_COOKIESESSION</constant></entry>
65
-
<entry valign="top">
66
-
&true; to mark this as a new cookie "session". It will force libcurl
67
-
to ignore all cookies it is about to load that are "session cookies"
68
-
from the previous session. By default, libcurl always stores and
69
-
loads all cookies, independent if they are session cookies or not.
70
-
Session cookies are cookies without expiry date and they are meant
71
-
to be alive and existing for this "session" only.
72
-
</entry>
73
-
<entry valign="top">
74
-
</entry>
75
-
</row>
76
-
<row>
77
-
<entry valign="top"><constant>CURLOPT_CERTINFO</constant></entry>
78
-
<entry valign="top">
79
-
&true; to output SSL certification information to <literal>STDERR</literal>
80
-
on secure transfers.
81
-
</entry>
82
-
<entry valign="top">
83
-
Added in cURL 7.19.1.
84
-
Requires <constant>CURLOPT_VERBOSE</constant> to be on to have an effect.
85
-
</entry>
86
-
</row>
87
-
<row>
88
-
<entry valign="top"><constant>CURLOPT_CONNECT_ONLY</constant></entry>
89
-
<entry valign="top">
90
-
&true; tells the library to perform all the required proxy authentication
91
-
and connection setup, but no data transfer. This option is implemented for
92
-
HTTP, SMTP and POP3.
93
-
</entry>
94
-
<entry valign="top">
95
-
Added in 7.15.2.
96
-
</entry>
97
-
</row>
98
-
<row>
99
-
<entry valign="top"><constant>CURLOPT_CRLF</constant></entry>
100
-
<entry valign="top">
101
-
&true; to convert Unix newlines to CRLF newlines
102
-
on transfers.
103
-
</entry>
104
-
<entry valign="top">
105
-
</entry>
106
-
</row>
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>
148
-
<entry valign="top"><constant>CURLOPT_DNS_USE_GLOBAL_CACHE</constant></entry>
149
-
<entry valign="top">
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.).
153
-
</entry>
154
-
<entry valign="top">
155
-
</entry>
156
-
</row>
157
-
<row>
158
-
<entry valign="top"><constant>CURLOPT_FAILONERROR</constant></entry>
159
-
<entry valign="top">
160
-
&true; to fail verbosely if the HTTP code returned
161
-
is greater than or equal to 400. The default behavior is to return
162
-
the page normally, ignoring the code.
163
-
</entry>
164
-
<entry valign="top">
165
-
</entry>
166
-
</row>
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>
177
-
<entry valign="top"><constant>CURLOPT_FILETIME</constant></entry>
178
-
<entry valign="top">
179
-
&true; to attempt to retrieve the modification
180
-
date of the remote document. This value can be retrieved using
181
-
the <constant>CURLINFO_FILETIME</constant> option with
182
-
<function>curl_getinfo</function>.
183
-
</entry>
184
-
<entry valign="top">
185
-
</entry>
186
-
</row>
187
-
<row>
188
-
<entry valign="top"><constant>CURLOPT_FOLLOWLOCATION</constant></entry>
189
-
<entry valign="top">
190
-
&true; to follow any
191
-
<literal>"Location: "</literal> header that the server sends as
192
-
part of the HTTP header.
193
-
See also <constant>CURLOPT_MAXREDIRS</constant>.
194
-
</entry>
195
-
<entry valign="top">
196
-
</entry>
197
-
</row>
198
-
<row>
199
-
<entry valign="top"><constant>CURLOPT_FORBID_REUSE</constant></entry>
200
-
<entry valign="top">
201
-
&true; to force the connection to explicitly
202
-
close when it has finished processing, and not be pooled for reuse.
203
-
</entry>
204
-
<entry valign="top">
205
-
</entry>
206
-
</row>
207
-
<row>
208
-
<entry valign="top"><constant>CURLOPT_FRESH_CONNECT</constant></entry>
209
-
<entry valign="top">
210
-
&true; to force the use of a new connection
211
-
instead of a cached one.
212
-
</entry>
213
-
<entry valign="top">
214
-
</entry>
215
-
</row>
216
-
<row>
217
-
<entry valign="top"><constant>CURLOPT_FTP_USE_EPRT</constant></entry>
218
-
<entry valign="top">
219
-
&true; to use EPRT (and LPRT) when doing active
220
-
FTP downloads. Use &false; to disable EPRT and LPRT and use PORT
221
-
only.
222
-
</entry>
223
-
<entry valign="top">
224
-
</entry>
225
-
</row>
226
-
<row>
227
-
<entry valign="top"><constant>CURLOPT_FTP_USE_EPSV</constant></entry>
228
-
<entry valign="top">
229
-
&true; to first try an EPSV command for FTP
230
-
transfers before reverting back to PASV. Set to &false;
231
-
to disable EPSV.
232
-
</entry>
233
-
<entry valign="top">
234
-
</entry>
235
-
</row>
236
-
<row>
237
-
<entry valign="top"><constant>CURLOPT_FTP_CREATE_MISSING_DIRS</constant></entry>
238
-
<entry valign="top">
239
-
&true; to create missing directories when an FTP operation
240
-
encounters a path that currently doesn't exist.
241
-
</entry>
242
-
<entry valign="top">
243
-
</entry>
244
-
</row>
245
-
<row>
246
-
<entry valign="top"><constant>CURLOPT_FTPAPPEND</constant></entry>
247
-
<entry valign="top">
248
-
&true; to append to the remote file instead of
249
-
overwriting it.
250
-
</entry>
251
-
<entry valign="top">
252
-
</entry>
253
-
</row>
254
-
<row>
255
-
<entry valign="top"><constant>CURLOPT_TCP_NODELAY</constant></entry>
256
-
<entry valign="top">
257
-
&true; to disable TCP's Nagle algorithm, which tries to minimize
258
-
the number of small packets on the network.
259
-
</entry>
260
-
<entry valign="top">
261
-
Available for versions compiled with libcurl 7.11.2 or
262
-
greater.
263
-
</entry>
264
-
</row>
265
-
<row>
266
-
<entry valign="top"><constant>CURLOPT_FTPASCII</constant></entry>
267
-
<entry valign="top">
268
-
An alias of
269
-
<constant>CURLOPT_TRANSFERTEXT</constant>. Use that instead.
270
-
</entry>
271
-
<entry valign="top">
272
-
</entry>
273
-
</row>
274
-
<row>
275
-
<entry valign="top"><constant>CURLOPT_FTPLISTONLY</constant></entry>
276
-
<entry valign="top">
277
-
&true; to only list the names of an FTP
278
-
directory.
279
-
</entry>
280
-
<entry valign="top">
281
-
</entry>
282
-
</row>
283
-
<row>
284
-
<entry valign="top"><constant>CURLOPT_HEADER</constant></entry>
285
-
<entry valign="top">
286
-
&true; to include the header in the output.
287
-
</entry>
288
-
<entry valign="top">
289
-
</entry>
290
-
</row>
291
-
<row>
292
-
<entry><constant>CURLINFO_HEADER_OUT</constant></entry>
293
-
<entry valign="top">
294
-
&true; to track the handle's request string.
295
-
</entry>
296
-
<entry valign="top">
297
-
The <constant>CURLINFO_</constant>
298
-
prefix is intentional.
299
-
</entry>
300
-
</row>
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 >= 7.64.0
309
-
</entry>
310
-
</row>
311
-
<row>
312
-
<entry valign="top"><constant>CURLOPT_HTTPGET</constant></entry>
313
-
<entry valign="top">
314
-
&true; to reset the HTTP request method to GET.
315
-
Since GET is the default, this is only necessary if the request
316
-
method has been changed.
317
-
</entry>
318
-
<entry valign="top">
319
-
</entry>
320
-
</row>
321
-
<row>
322
-
<entry valign="top"><constant>CURLOPT_HTTPPROXYTUNNEL</constant></entry>
323
-
<entry valign="top">
324
-
&true; to tunnel through a given HTTP proxy.
325
-
</entry>
326
-
<entry valign="top">
327
-
</entry>
328
-
</row>
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 >= 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 >= 7.51.0.
348
-
</entry>
349
-
</row>
350
-
<row>
351
-
<entry valign="top"><constant>CURLOPT_MUTE</constant></entry>
352
-
<entry valign="top">
353
-
&true; to be completely silent with regards to
354
-
the cURL functions.
355
-
</entry>
356
-
<entry valign="top">
357
-
Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead)
358
-
</entry>
359
-
</row>
360
-
<row>
361
-
<entry valign="top"><constant>CURLOPT_NETRC</constant></entry>
362
-
<entry valign="top">
363
-
&true; to scan the <filename>~/.netrc</filename>
364
-
file to find a username and password for the remote site that
365
-
a connection is being established with.
366
-
</entry>
367
-
<entry valign="top">
368
-
</entry>
369
-
</row>
370
-
<row>
371
-
<entry valign="top"><constant>CURLOPT_NOBODY</constant></entry>
372
-
<entry valign="top">
373
-
&true; to exclude the body from the output.
374
-
Request method is then set to HEAD. Changing this to &false; does
375
-
not change it to GET.
376
-
</entry>
377
-
<entry valign="top">
378
-
</entry>
379
-
</row>
380
-
<row>
381
-
<entry valign="top"><constant>CURLOPT_NOPROGRESS</constant></entry>
382
-
<entry valign="top"><para>
383
-
&true; to disable the progress meter for cURL transfers.
384
-
<note>
385
-
<para>
386
-
PHP automatically sets this option to &true;, this should only be
387
-
changed for debugging purposes.
388
-
</para>
389
-
</note>
390
-
</para></entry>
391
-
<entry valign="top">
392
-
</entry>
393
-
</row>
394
-
<row>
395
-
<entry valign="top"><constant>CURLOPT_NOSIGNAL</constant></entry>
396
-
<entry valign="top">
397
-
&true; to ignore any cURL function that causes a
398
-
signal to be sent to the PHP process. This is turned on by default
399
-
in multi-threaded SAPIs so timeout options can still be used.
400
-
</entry>
401
-
<entry valign="top">
402
-
Added in cURL 7.10.
403
-
</entry>
404
-
</row>
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>
424
-
<entry valign="top"><constant>CURLOPT_POST</constant></entry>
425
-
<entry valign="top">
426
-
&true; to do a regular HTTP POST. This POST is the
427
-
normal <literal>application/x-www-form-urlencoded</literal> kind,
428
-
most commonly used by HTML forms.
429
-
</entry>
430
-
<entry valign="top">
431
-
</entry>
432
-
</row>
433
-
<row>
434
-
<entry valign="top"><constant>CURLOPT_PUT</constant></entry>
435
-
<entry valign="top">
436
-
&true; to HTTP PUT a file. The file to PUT must
437
-
be set with <constant>CURLOPT_INFILE</constant> and
438
-
<constant>CURLOPT_INFILESIZE</constant>.
439
-
</entry>
440
-
<entry valign="top">
441
-
</entry>
442
-
</row>
443
-
<row>
444
-
<entry valign="top"><constant>CURLOPT_RETURNTRANSFER</constant></entry>
445
-
<entry valign="top">
446
-
&true; to return the transfer as a string of the
447
-
return value of <function>curl_exec</function> instead of outputting
448
-
it directly.
449
-
</entry>
450
-
<entry valign="top">
451
-
</entry>
452
-
</row>
453
-
<row>
454
-
<entry valign="top"><constant>CURLOPT_SASL_IR</constant></entry>
455
-
<entry valign="top">
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.
479
-
</entry>
480
-
<entry valign="top">
481
-
Added in cURL 7.36.0. Available since PHP 7.0.7.
482
-
</entry>
483
-
</row>
484
-
<row>
485
-
<entry valign="top"><constant>CURLOPT_SSL_VERIFYPEER</constant></entry>
486
-
<entry valign="top">
487
-
&false; to stop cURL from verifying the peer's
488
-
certificate. Alternate certificates to verify against can be
489
-
specified with the <constant>CURLOPT_CAINFO</constant> option
490
-
or a certificate directory can be specified with the
491
-
<constant>CURLOPT_CAPATH</constant> option.
492
-
</entry>
493
-
<entry valign="top">
494
-
&true; by default as of cURL 7.10. Default bundle installed as of
495
-
cURL 7.10.
496
-
</entry>
497
-
</row>
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 >= 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>
563
-
<entry valign="top"><constant>CURLOPT_TRANSFERTEXT</constant></entry>
564
-
<entry valign="top">
565
-
&true; to use ASCII mode for FTP transfers.
566
-
For LDAP, it retrieves data in plain text instead of HTML. On
567
-
Windows systems, it will not set <literal>STDOUT</literal> to binary
568
-
mode.
569
-
</entry>
570
-
<entry valign="top">
571
-
</entry>
572
-
</row>
573
-
<row>
574
-
<entry valign="top"><constant>CURLOPT_UNRESTRICTED_AUTH</constant></entry>
575
-
<entry valign="top">
576
-
&true; to keep sending the username and password
577
-
when following locations (using
578
-
<constant>CURLOPT_FOLLOWLOCATION</constant>), even when the
579
-
hostname has changed.
580
-
</entry>
581
-
<entry valign="top">
582
-
</entry>
583
-
</row>
584
-
<row>
585
-
<entry valign="top"><constant>CURLOPT_UPLOAD</constant></entry>
586
-
<entry valign="top">
587
-
&true; to prepare for an upload.
588
-
</entry>
589
-
<entry valign="top">
590
-
</entry>
591
-
</row>
592
-
<row>
593
-
<entry valign="top"><constant>CURLOPT_VERBOSE</constant></entry>
594
-
<entry valign="top">
595
-
&true; to output verbose information. Writes
596
-
output to <literal>STDERR</literal>, or the file specified using
597
-
<constant>CURLOPT_STDERR</constant>.
598
-
</entry>
599
-
<entry valign="top">
600
-
</entry>
601
-
</row>
602
-
</tbody>
603
-
</tgroup>
604
-
</informaltable>
605
-
</para>
606
-
<para>
607
-
<parameter>value</parameter> should be an <type>int</type> for the
608
-
following values of the <parameter>option</parameter> parameter:
609
-
<informaltable>
610
-
<tgroup cols="3">
611
-
<thead>
612
-
<row>
613
-
<entry>Option</entry>
614
-
<entry>Set <parameter>value</parameter> to</entry>
615
-
<entry>Notes</entry>
616
-
</row>
617
-
</thead>
618
-
<tbody>
619
-
<row>
620
-
<entry valign="top"><constant>CURLOPT_BUFFERSIZE</constant></entry>
621
-
<entry valign="top">
622
-
The size of the buffer to use for each read. There is no guarantee
623
-
this request will be fulfilled, however.
624
-
</entry>
625
-
<entry valign="top">
626
-
Added in cURL 7.10.
627
-
</entry>
628
-
</row>
629
-
<row>
630
-
<entry><constant>CURLOPT_CONNECTTIMEOUT</constant></entry>
631
-
<entry valign="top">
632
-
The number of seconds to wait while trying to connect. Use 0 to
633
-
wait indefinitely.
634
-
</entry>
635
-
<entry valign="top">
636
-
</entry>
637
-
</row>
638
-
<row>
639
-
<entry valign="top"><constant>CURLOPT_CONNECTTIMEOUT_MS</constant></entry>
640
-
<entry valign="top">
641
-
The number of milliseconds to wait while trying to connect. Use 0 to
642
-
wait indefinitely.
643
-
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
644
-
If libcurl is built to use the standard system name resolver, that
645
-
portion of the connect will still use full-second resolution for
646
-
timeouts with a minimum timeout allowed of one second.
647
-
</entry>
648
-
<entry valign="top">
649
-
Added in cURL 7.16.2.
650
-
</entry>
651
-
</row>
652
-
<row>
653
-
<entry valign="top"><constant>CURLOPT_DNS_CACHE_TIMEOUT</constant></entry>
654
-
<entry valign="top">
655
-
The number of seconds to keep DNS entries in memory. This
656
-
option is set to 120 (2 minutes) by default.
657
-
</entry>
658
-
<entry valign="top">
659
-
</entry>
660
-
</row>
661
-
<row>
662
-
<entry valign="top"><constant>CURLOPT_EXPECT_100_TIMEOUT_MS</constant></entry>
663
-
<entry valign="top">
664
-
The timeout for Expect: 100-continue 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>
684
-
<entry valign="top"><constant>CURLOPT_FTPSSLAUTH</constant></entry>
685
-
<entry valign="top">
686
-
The FTP authentication method (when is activated):
687
-
<literal>CURLFTPAUTH_SSL</literal> (try SSL first),
688
-
<literal>CURLFTPAUTH_TLS</literal> (try TLS first), or
689
-
<literal>CURLFTPAUTH_DEFAULT</literal> (let cURL decide).
690
-
</entry>
691
-
<entry valign="top">
692
-
Added in cURL 7.12.2.
693
-
</entry>
694
-
</row>
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>
726
-
<entry valign="top"><constant>CURLOPT_HTTP_VERSION</constant></entry>
727
-
<entry valign="top">
728
-
<constant>CURL_HTTP_VERSION_NONE</constant> (default, lets CURL
729
-
decide which version to use),
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).
736
-
</entry>
737
-
<entry valign="top">
738
-
</entry>
739
-
</row>
740
-
<row>
741
-
<entry valign="top"><constant>CURLOPT_HTTPAUTH</constant></entry>
742
-
<entry valign="top">
743
-
<para>
744
-
The HTTP authentication method(s) to use. The options are:
745
-
<constant>CURLAUTH_BASIC</constant>,
746
-
<constant>CURLAUTH_DIGEST</constant>,
747
-
<constant>CURLAUTH_GSSNEGOTIATE</constant>,
748
-
<constant>CURLAUTH_NTLM</constant>,
749
-
<constant>CURLAUTH_ANY</constant>, and
750
-
<constant>CURLAUTH_ANYSAFE</constant>.
751
-
</para>
752
-
<para>
753
-
The bitwise <literal>|</literal> (or) operator can be used to combine
754
-
more than one method. If this is done, cURL will poll the server to see
755
-
what methods it supports and pick the best one.
756
-
</para>
757
-
<para>
758
-
<constant>CURLAUTH_ANY</constant> is an alias for
759
-
<literal>CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
760
-
</para>
761
-
<para>
762
-
<constant>CURLAUTH_ANYSAFE</constant> is an alias for
763
-
<literal>CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM</literal>.
764
-
</para>
765
-
</entry>
766
-
<entry valign="top">
767
-
</entry>
768
-
</row>
769
-
<row>
770
-
<entry valign="top"><constant>CURLOPT_INFILESIZE</constant></entry>
771
-
<entry valign="top">
772
-
The expected size, in bytes, of the file when uploading a file to
773
-
a remote site. Note that using this option will not stop libcurl
774
-
from sending more data, as exactly what is sent depends on
775
-
<constant>CURLOPT_READFUNCTION</constant>.
776
-
</entry>
777
-
<entry valign="top">
778
-
</entry>
779
-
</row>
780
-
<row>
781
-
<entry valign="top"><constant>CURLOPT_LOW_SPEED_LIMIT</constant></entry>
782
-
<entry valign="top">
783
-
The transfer speed, in bytes per second, that the transfer should be
784
-
below during the count of <constant>CURLOPT_LOW_SPEED_TIME</constant>
785
-
seconds before PHP considers the transfer too slow and aborts.
786
-
</entry>
787
-
<entry valign="top">
788
-
</entry>
789
-
</row>
790
-
<row>
791
-
<entry valign="top"><constant>CURLOPT_LOW_SPEED_TIME</constant></entry>
792
-
<entry valign="top">
793
-
The number of seconds the transfer speed should be below
794
-
<constant>CURLOPT_LOW_SPEED_LIMIT</constant> before PHP considers
795
-
the transfer too slow and aborts.
796
-
</entry>
797
-
<entry valign="top">
798
-
</entry>
799
-
</row>
800
-
<row>
801
-
<entry valign="top"><constant>CURLOPT_MAXCONNECTS</constant></entry>
802
-
<entry valign="top">
803
-
The maximum amount of persistent connections that are allowed.
804
-
When the limit is reached, the oldest one in the cache is closed
805
-
to prevent increasing the number of open connections.
806
-
</entry>
807
-
<entry valign="top">
808
-
</entry>
809
-
</row>
810
-
<row>
811
-
<entry valign="top"><constant>CURLOPT_MAXREDIRS</constant></entry>
812
-
<entry valign="top">
813
-
The maximum amount of HTTP redirections to follow. Use this option
814
-
alongside <constant>CURLOPT_FOLLOWLOCATION</constant>.
815
-
Default value of <literal>20</literal> is set to prevent infinite redirects.
816
-
Setting to <literal>-1</literal> allows inifinite redirects, and <literal>0</literal>
817
-
refuses all redirects.
818
-
</entry>
819
-
<entry valign="top">
820
-
</entry>
821
-
</row>
822
-
<row>
823
-
<entry valign="top"><constant>CURLOPT_PORT</constant></entry>
824
-
<entry valign="top">
825
-
An alternative port number to connect to.
826
-
</entry>
827
-
<entry valign="top">
828
-
</entry>
829
-
</row>
830
-
<row>
831
-
<entry valign="top"><constant>CURLOPT_POSTREDIR</constant></entry>
832
-
<entry valign="top">
833
-
A bitmask of 1 (301 Moved Permanently), 2 (302 Found)
834
-
and 4 (303 See Other) if the HTTP POST method should be maintained
835
-
when <constant>CURLOPT_FOLLOWLOCATION</constant> is set and a
836
-
specific type of redirect occurs.
837
-
</entry>
838
-
<entry valign="top">
839
-
Added in cURL 7.19.1.
840
-
</entry>
841
-
</row>
842
-
<row>
843
-
<entry valign="top"><constant>CURLOPT_PROTOCOLS</constant></entry>
844
-
<entry valign="top">
845
-
<para>
846
-
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
847
-
limits what protocols libcurl may use in the transfer. This allows you to have
848
-
a libcurl built to support a wide range of protocols but still limit specific
849
-
transfers to only be allowed to use a subset of them. By default libcurl will
850
-
accept all protocols it supports.
851
-
See also <constant>CURLOPT_REDIR_PROTOCOLS</constant>.
852
-
</para>
853
-
<para>
854
-
Valid protocol options are:
855
-
<constant>CURLPROTO_HTTP</constant>,
856
-
<constant>CURLPROTO_HTTPS</constant>,
857
-
<constant>CURLPROTO_FTP</constant>,
858
-
<constant>CURLPROTO_FTPS</constant>,
859
-
<constant>CURLPROTO_SCP</constant>,
860
-
<constant>CURLPROTO_SFTP</constant>,
861
-
<constant>CURLPROTO_TELNET</constant>,
862
-
<constant>CURLPROTO_LDAP</constant>,
863
-
<constant>CURLPROTO_LDAPS</constant>,
864
-
<constant>CURLPROTO_DICT</constant>,
865
-
<constant>CURLPROTO_FILE</constant>,
866
-
<constant>CURLPROTO_TFTP</constant>,
867
-
<constant>CURLPROTO_ALL</constant>
868
-
</para>
869
-
</entry>
870
-
<entry valign="top">
871
-
Added in cURL 7.19.4.
872
-
</entry>
873
-
</row>
874
-
<row>
875
-
<entry valign="top"><constant>CURLOPT_PROXYAUTH</constant></entry>
876
-
<entry valign="top">
877
-
The HTTP authentication method(s) to use for the proxy connection.
878
-
Use the same bitmasks as described in
879
-
<constant>CURLOPT_HTTPAUTH</constant>. For proxy authentication,
880
-
only <constant>CURLAUTH_BASIC</constant> and
881
-
<constant>CURLAUTH_NTLM</constant> are currently supported.
882
-
</entry>
883
-
<entry valign="top">
884
-
Added in cURL 7.10.7.
885
-
</entry>
886
-
</row>
887
-
<row>
888
-
<entry valign="top"><constant>CURLOPT_PROXYPORT</constant></entry>
889
-
<entry valign="top">
890
-
The port number of the proxy to connect to. This port number can
891
-
also be set in <constant>CURLOPT_PROXY</constant>.
892
-
</entry>
893
-
<entry valign="top">
894
-
</entry>
895
-
</row>
896
-
<row>
897
-
<entry valign="top"><constant>CURLOPT_PROXYTYPE</constant></entry>
898
-
<entry valign="top">
899
-
Either <constant>CURLPROXY_HTTP</constant> (default),
900
-
<constant>CURLPROXY_SOCKS4</constant>,
901
-
<constant>CURLPROXY_SOCKS5</constant>,
902
-
<constant>CURLPROXY_SOCKS4A</constant> or
903
-
<constant>CURLPROXY_SOCKS5_HOSTNAME</constant>.
904
-
</entry>
905
-
<entry valign="top">
906
-
Added in cURL 7.10.
907
-
</entry>
908
-
</row>
909
-
<row>
910
-
<entry valign="top"><constant>CURLOPT_REDIR_PROTOCOLS</constant></entry>
911
-
<entry valign="top">
912
-
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
913
-
limits what protocols libcurl may use in a transfer that it follows to in
914
-
a redirect when <constant>CURLOPT_FOLLOWLOCATION</constant> is enabled.
915
-
This allows you to limit specific transfers to only be allowed to use a subset
916
-
of protocols in redirections. By default libcurl will allow all protocols
917
-
except for FILE and SCP. This is a difference compared to pre-7.19.4 versions
918
-
which unconditionally would follow to all protocols supported.
919
-
See also <constant>CURLOPT_PROTOCOLS</constant> for protocol constant values.
920
-
</entry>
921
-
<entry valign="top">
922
-
Added in cURL 7.19.4.
923
-
</entry>
924
-
</row>
925
-
<row>
926
-
<entry valign="top"><constant>CURLOPT_RESUME_FROM</constant></entry>
927
-
<entry valign="top">
928
-
The offset, in bytes, to resume a transfer from.
929
-
</entry>
930
-
<entry valign="top">
931
-
</entry>
932
-
</row>
933
-
<row>
934
-
<entry valign="top"><constant>CURLOPT_SOCKS5_AUTH</constant></entry>
935
-
<entry valign="top">
936
-
<para>
937
-
The SOCKS5 authentication method(s) to use. The options are:
938
-
<constant>CURLAUTH_BASIC</constant>,
939
-
<constant>CURLAUTH_GSSAPI</constant>,
940
-
<constant>CURLAUTH_NONE</constant>.
941
-
</para>
942
-
<para>
943
-
The bitwise <literal>|</literal> (or) operator can be used to combine
944
-
more than one method. If this is done, cURL will poll the server to see
945
-
what methods it supports and pick the best one.
946
-
</para>
947
-
<para>
948
-
<constant>CURLAUTH_BASIC</constant> allows username/password authentication.
949
-
</para>
950
-
<para>
951
-
<constant>CURLAUTH_GSSAPI</constant> allows GSS-API authentication.
952
-
</para>
953
-
<para>
954
-
<constant>CURLAUTH_NONE</constant> allows no authentication.
955
-
</para>
956
-
<para>
957
-
Defaults to <literal>CURLAUTH_BASIC|CURLAUTH_GSSAPI</literal>.
958
-
Set the actual username and password with the <constant>CURLOPT_PROXYUSERPWD</constant> option.
959
-
</para>
960
-
</entry>
961
-
<entry valign="top">
962
-
Available as of 7.3.0 and curl >= 7.55.0.
963
-
</entry>
964
-
</row>
965
-
<row>
966
-
<entry valign="top"><constant>CURLOPT_SSL_OPTIONS</constant></entry>
967
-
<entry valign="top">
968
-
Set SSL behavior options, which is a bitmask of any of the following constants:
969
-
<simpara>
970
-
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
971
-
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
972
-
</simpara>
973
-
<simpara>
974
-
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
975
-
revocation checks for those SSL backends where such behavior is
976
-
present.
977
-
</simpara>
978
-
</entry>
979
-
<entry valign="top">
980
-
Added in cURL 7.25.0. Available since PHP 7.0.7.
981
-
</entry>
982
-
</row>
983
-
<row>
984
-
<entry valign="top"><constant>CURLOPT_SSL_VERIFYHOST</constant></entry>
985
-
<entry valign="top">
986
-
<literal>2</literal> to verify that a Common Name field or a Subject Alternate Name
987
-
field in the SSL peer certificate matches the provided hostname.
988
-
<literal>0</literal> to not check the names.
989
-
<literal>1</literal> should not be used.
990
-
In production environments the value of this option
991
-
should be kept at <literal>2</literal> (default value).
992
-
</entry>
993
-
<entry valign="top">
994
-
Support for value <literal>1</literal> removed in cURL 7.28.1.
995
-
</entry>
996
-
</row>
997
-
<row>
998
-
<entry valign="top"><constant>CURLOPT_SSLVERSION</constant></entry>
999
-
<entry valign="top">
1000
-
One of <constant>CURL_SSLVERSION_DEFAULT</constant> (0),
1001
-
<constant>CURL_SSLVERSION_TLSv1</constant> (1),
1002
-
<constant>CURL_SSLVERSION_SSLv2</constant> (2),
1003
-
<constant>CURL_SSLVERSION_SSLv3</constant> (3),
1004
-
<constant>CURL_SSLVERSION_TLSv1_0</constant> (4),
1005
-
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5) or
1006
-
<constant>CURL_SSLVERSION_TLSv1_2</constant> (6).
1007
-
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_*</constant>
1008
-
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_*</constant>
1009
-
constants with one of the <constant>CURL_SSLVERSION_MAX_*</constant> constants.
1010
-
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant> (the maximum version supported by the library),
1011
-
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
1012
-
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
1013
-
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>, or
1014
-
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant>.
1015
-
<note>
1016
-
<para>
1017
-
Your best bet is to not set this and let it use the default.
1018
-
Setting it to 2 or 3 is very dangerous given the known
1019
-
vulnerabilities in SSLv2 and SSLv3.
1020
-
</para>
1021
-
</note>
1022
-
</entry>
1023
-
<entry valign="top">
1024
-
</entry>
1025
-
</row>
1026
-
<row>
1027
-
<entry valign="top"><constant>CURLOPT_PROXY_SSL_OPTIONS</constant></entry>
1028
-
<entry valign="top">
1029
-
Set proxy SSL behavior options, which is a bitmask of any of the following constants:
1030
-
<simpara>
1031
-
<constant>CURLSSLOPT_ALLOW_BEAST</constant>: do not attempt to use
1032
-
any workarounds for a security flaw in the SSL3 and TLS1.0 protocols.
1033
-
</simpara>
1034
-
<simpara>
1035
-
<constant>CURLSSLOPT_NO_REVOKE</constant>: disable certificate
1036
-
revocation checks for those SSL backends where such behavior is
1037
-
present. (curl >= 7.44.0)
1038
-
</simpara>
1039
-
<simpara>
1040
-
<constant>CURLSSLOPT_NO_PARTIALCHAIN</constant>: do not accept "partial"
1041
-
certificate chains, which it otherwise does by default. (curl >= 7.68.0)
1042
-
</simpara>
1043
-
</entry>
1044
-
<entry valign="top">
1045
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1046
-
</entry>
1047
-
</row>
1048
-
<row>
1049
-
<entry valign="top"><constant>CURLOPT_PROXY_SSL_VERIFYHOST</constant></entry>
1050
-
<entry valign="top">
1051
-
Set to <literal>2</literal> to verify in the HTTPS proxy's certificate name fields against the proxy name.
1052
-
When set to <literal>0</literal> the connection succeeds regardless of the names used in the certificate.
1053
-
Use that ability with caution!
1054
-
<literal>1</literal> treated as a debug option in curl 7.28.0 and earlier.
1055
-
From curl 7.28.1 to 7.65.3 <constant>CURLE_BAD_FUNCTION_ARGUMENT</constant> is returned.
1056
-
From curl 7.66.0 onwards <literal>1</literal> and <literal>2</literal> is treated as the same value.
1057
-
In production environments the value of this option should be kept at <literal>2</literal> (default value).
1058
-
</entry>
1059
-
<entry valign="top">
1060
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1061
-
</entry>
1062
-
</row>
1063
-
<row>
1064
-
<entry valign="top"><constant>CURLOPT_PROXY_SSLVERSION</constant></entry>
1065
-
<entry valign="top">
1066
-
One of <constant>CURL_SSLVERSION_DEFAULT</constant>,
1067
-
<constant>CURL_SSLVERSION_TLSv1</constant>,
1068
-
<constant>CURL_SSLVERSION_TLSv1_0</constant>,
1069
-
<constant>CURL_SSLVERSION_TLSv1_1</constant>,
1070
-
<constant>CURL_SSLVERSION_TLSv1_2</constant>,
1071
-
<constant>CURL_SSLVERSION_TLSv1_3</constant>,
1072
-
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant>,
1073
-
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
1074
-
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
1075
-
<constant>CURL_SSLVERSION_MAX_TLSv1_2</constant>,
1076
-
<constant>CURL_SSLVERSION_MAX_TLSv1_3</constant> or
1077
-
<constant>CURL_SSLVERSION_SSLv3</constant>.
1078
-
<note>
1079
-
<para>
1080
-
Your best bet is to not set this and let it use the default <constant>CURL_SSLVERSION_DEFAULT</constant>
1081
-
which will attempt to figure out the remote SSL protocol version.
1082
-
</para>
1083
-
</note>
1084
-
</entry>
1085
-
<entry valign="top">
1086
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1087
-
</entry>
1088
-
</row>
1089
-
<row>
1090
-
<entry valign="top"><constant>CURLOPT_STREAM_WEIGHT</constant></entry>
1091
-
<entry valign="top">
1092
-
Set the numerical stream weight (a number between 1 and 256).
1093
-
</entry>
1094
-
<entry valign="top">
1095
-
Added in cURL 7.46.0. Available since PHP 7.0.7.
1096
-
</entry>
1097
-
</row>
1098
-
<row>
1099
-
<entry valign="top"><constant>CURLOPT_TCP_KEEPALIVE</constant></entry>
1100
-
<entry valign="top">
1101
-
If set to <literal>1</literal>, TCP keepalive probes will be sent. The delay and
1102
-
frequency of these probes can be controlled by the <constant>CURLOPT_TCP_KEEPIDLE</constant>
1103
-
and <constant>CURLOPT_TCP_KEEPINTVL</constant> options, provided the operating system
1104
-
supports them. If set to <literal>0</literal> (default) keepalive probes are disabled.
1105
-
</entry>
1106
-
<entry valign="top">
1107
-
Added in cURL 7.25.0.
1108
-
</entry>
1109
-
</row>
1110
-
<row>
1111
-
<entry valign="top"><constant>CURLOPT_TCP_KEEPIDLE</constant></entry>
1112
-
<entry valign="top">
1113
-
Sets the delay, in seconds, that the operating system will wait while the connection is
1114
-
idle before sending keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is
1115
-
enabled. Not all operating systems support this option.
1116
-
The default is <literal>60</literal>.
1117
-
</entry>
1118
-
<entry valign="top">
1119
-
Added in cURL 7.25.0.
1120
-
</entry>
1121
-
</row>
1122
-
<row>
1123
-
<entry valign="top"><constant>CURLOPT_TCP_KEEPINTVL</constant></entry>
1124
-
<entry valign="top">
1125
-
Sets the interval, in seconds, that the operating system will wait between sending
1126
-
keepalive probes, if <constant>CURLOPT_TCP_KEEPALIVE</constant> is enabled.
1127
-
Not all operating systems support this option.
1128
-
The default is <literal>60</literal>.
1129
-
</entry>
1130
-
<entry valign="top">
1131
-
Added in cURL 7.25.0.
1132
-
</entry>
1133
-
</row>
1134
-
<row>
1135
-
<entry valign="top"><constant>CURLOPT_TIMECONDITION</constant></entry>
1136
-
<entry valign="top">
1137
-
How <constant>CURLOPT_TIMEVALUE</constant> is treated.
1138
-
Use <constant>CURL_TIMECOND_IFMODSINCE</constant> to return the
1139
-
page only if it has been modified since the time specified in
1140
-
<constant>CURLOPT_TIMEVALUE</constant>. If it hasn't been modified,
1141
-
a <literal>"304 Not Modified"</literal> header will be returned
1142
-
assuming <constant>CURLOPT_HEADER</constant> is &true;.
1143
-
Use <constant>CURL_TIMECOND_IFUNMODSINCE</constant> for the reverse
1144
-
effect. Use <constant>CURL_TIMECOND_NONE</constant> to ignore
1145
-
<constant>CURLOPT_TIMEVALUE</constant> and always return the page.
1146
-
<constant>CURL_TIMECOND_NONE</constant> is the default.
1147
-
</entry>
1148
-
<entry valign="top">
1149
-
Before cURL 7.46.0 the default was
1150
-
<constant>CURL_TIMECOND_IFMODSINCE</constant>.
1151
-
</entry>
1152
-
</row>
1153
-
<row>
1154
-
<entry valign="top"><constant>CURLOPT_TIMEOUT</constant></entry>
1155
-
<entry valign="top">
1156
-
The maximum number of seconds to allow cURL functions to execute.
1157
-
</entry>
1158
-
<entry valign="top">
1159
-
</entry>
1160
-
</row>
1161
-
<row>
1162
-
<entry valign="top"><constant>CURLOPT_TIMEOUT_MS</constant></entry>
1163
-
<entry valign="top">
1164
-
The maximum number of milliseconds to allow cURL functions to
1165
-
execute.
1166
-
<!-- http://curl.haxx.se/libcurl/c/curl_easy_setopt.html -->
1167
-
If libcurl is built to use the standard system name resolver, that
1168
-
portion of the connect will still use full-second resolution for
1169
-
timeouts with a minimum timeout allowed of one second.
1170
-
</entry>
1171
-
<entry valign="top">
1172
-
Added in cURL 7.16.2.
1173
-
</entry>
1174
-
</row>
1175
-
<row>
1176
-
<entry valign="top"><constant>CURLOPT_TIMEVALUE</constant></entry>
1177
-
<entry valign="top">
1178
-
The time in seconds since January 1st, 1970. The time will be used
1179
-
by <constant>CURLOPT_TIMECONDITION</constant>.
1180
-
</entry>
1181
-
<entry valign="top">
1182
-
</entry>
1183
-
</row>
1184
-
<row>
1185
-
<entry valign="top"><constant>CURLOPT_TIMEVALUE_LARGE</constant></entry>
1186
-
<entry valign="top">
1187
-
The time in seconds since January 1st, 1970. The time will be used
1188
-
by <constant>CURLOPT_TIMECONDITION</constant>. Defaults to zero.
1189
-
The difference between this option and <constant>CURLOPT_TIMEVALUE</constant>
1190
-
is the type of the argument. On systems where 'long' is only 32 bit wide,
1191
-
this option has to be used to set dates beyond the year 2038.
1192
-
</entry>
1193
-
<entry valign="top">
1194
-
Added in cURL 7.59.0. Available since PHP 7.3.0.
1195
-
</entry>
1196
-
</row>
1197
-
<row>
1198
-
<entry valign="top"><constant>CURLOPT_MAX_RECV_SPEED_LARGE</constant></entry>
1199
-
<entry valign="top">
1200
-
If a download exceeds this speed (counted in bytes per second) on
1201
-
cumulative average during the transfer, the transfer will pause to
1202
-
keep the average rate less than or equal to the parameter value.
1203
-
Defaults to unlimited speed.
1204
-
</entry>
1205
-
<entry valign="top">
1206
-
Added in cURL 7.15.5.
1207
-
</entry>
1208
-
</row>
1209
-
<row>
1210
-
<entry valign="top"><constant>CURLOPT_MAX_SEND_SPEED_LARGE</constant></entry>
1211
-
<entry valign="top">
1212
-
If an upload exceeds this speed (counted in bytes per second) on
1213
-
cumulative average during the transfer, the transfer will pause to
1214
-
keep the average rate less than or equal to the parameter value.
1215
-
Defaults to unlimited speed.
1216
-
</entry>
1217
-
<entry valign="top">
1218
-
Added in cURL 7.15.5.
1219
-
</entry>
1220
-
</row>
1221
-
<row>
1222
-
<entry valign="top"><constant>CURLOPT_SSH_AUTH_TYPES</constant></entry>
1223
-
<entry valign="top">
1224
-
A bitmask consisting of one or more of
1225
-
<constant>CURLSSH_AUTH_PUBLICKEY</constant>,
1226
-
<constant>CURLSSH_AUTH_PASSWORD</constant>,
1227
-
<constant>CURLSSH_AUTH_HOST</constant>,
1228
-
<constant>CURLSSH_AUTH_KEYBOARD</constant>. Set to
1229
-
<constant>CURLSSH_AUTH_ANY</constant> to let libcurl pick one.
1230
-
</entry>
1231
-
<entry valign="top">
1232
-
Added in cURL 7.16.1.
1233
-
</entry>
1234
-
</row>
1235
-
<row>
1236
-
<entry valign="top"><constant>CURLOPT_IPRESOLVE</constant></entry>
1237
-
<entry valign="top">
1238
-
Allows an application to select what kind of IP addresses to use when
1239
-
resolving host names. This is only interesting when using host names that
1240
-
resolve addresses using more than one version of IP, possible values are
1241
-
<constant>CURL_IPRESOLVE_WHATEVER</constant>,
1242
-
<constant>CURL_IPRESOLVE_V4</constant>,
1243
-
<constant>CURL_IPRESOLVE_V6</constant>, by default
1244
-
<constant>CURL_IPRESOLVE_WHATEVER</constant>.
1245
-
</entry>
1246
-
<entry valign="top">
1247
-
Added in cURL 7.10.8.
1248
-
</entry>
1249
-
</row>
1250
-
<row>
1251
-
<entry valign="top"><constant>CURLOPT_FTP_FILEMETHOD</constant></entry>
1252
-
<entry valign="top">
1253
-
Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
1254
-
<constant>CURLFTPMETHOD_MULTICWD</constant>,
1255
-
<constant>CURLFTPMETHOD_NOCWD</constant> and
1256
-
<constant>CURLFTPMETHOD_SINGLECWD</constant>.
1257
-
</entry>
1258
-
<entry valign="top">
1259
-
Added in cURL 7.15.1.
1260
-
</entry>
1261
-
</row>
1262
-
</tbody>
1263
-
</tgroup>
1264
-
</informaltable>
1265
-
</para>
1266
-
<para>
1267
-
<parameter>value</parameter> should be a <type>string</type> for the
1268
-
following values of the <parameter>option</parameter> parameter:
1269
-
<informaltable>
1270
-
<tgroup cols="3">
1271
-
<thead>
1272
-
<row>
1273
-
<entry>Option</entry>
1274
-
<entry>Set <parameter>value</parameter> to</entry>
1275
-
<entry>Notes</entry>
1276
-
</row>
1277
-
</thead>
1278
-
<tbody>
1279
-
<row>
1280
-
<entry valign="top"><constant>CURLOPT_ABSTRACT_UNIX_SOCKET</constant></entry>
1281
-
<entry valign="top">
1282
-
Enables the use of an abstract Unix domain socket instead of
1283
-
establishing a TCP connection to a host and sets the path to
1284
-
the given <type>string</type>. This option shares the same semantics
1285
-
as <constant>CURLOPT_UNIX_SOCKET_PATH</constant>. These two options
1286
-
share the same storage and therefore only one of them can be set
1287
-
per handle.
1288
-
</entry>
1289
-
<entry valign="top">
1290
-
Available since PHP 7.3.0 and cURL 7.53.0
1291
-
</entry>
1292
-
</row>
1293
-
<row>
1294
-
<entry valign="top"><constant>CURLOPT_CAINFO</constant></entry>
1295
-
<entry valign="top">
1296
-
The name of a file holding one or more certificates to verify the
1297
-
peer with. This only makes sense when used in combination with
1298
-
<constant>CURLOPT_SSL_VERIFYPEER</constant>.
1299
-
</entry>
1300
-
<entry valign="top">
1301
-
Might require an absolute path.
1302
-
</entry>
1303
-
</row>
1304
-
<row>
1305
-
<entry valign="top"><constant>CURLOPT_CAPATH</constant></entry>
1306
-
<entry valign="top">
1307
-
A directory that holds multiple CA certificates. Use this option
1308
-
alongside <constant>CURLOPT_SSL_VERIFYPEER</constant>.
1309
-
</entry>
1310
-
<entry valign="top">
1311
-
</entry>
1312
-
</row>
1313
-
<row>
1314
-
<entry valign="top"><constant>CURLOPT_COOKIE</constant></entry>
1315
-
<entry valign="top">
1316
-
The contents of the <literal>"Cookie: "</literal> header to be
1317
-
used in the HTTP request.
1318
-
Note that multiple cookies are separated with a semicolon followed
1319
-
by a space (e.g., "<literal>fruit=apple; colour=red</literal>")
1320
-
</entry>
1321
-
<entry valign="top">
1322
-
</entry>
1323
-
</row>
1324
-
<row>
1325
-
<entry valign="top"><constant>CURLOPT_COOKIEFILE</constant></entry>
1326
-
<entry valign="top">
1327
-
The name of the file containing the cookie data. The cookie file can
1328
-
be in Netscape format, or just plain HTTP-style headers dumped into
1329
-
a file.
1330
-
If the name is an empty string, no cookies are loaded, but cookie
1331
-
handling is still enabled.
1332
-
</entry>
1333
-
<entry valign="top">
1334
-
</entry>
1335
-
</row>
1336
-
<row>
1337
-
<entry valign="top"><constant>CURLOPT_COOKIEJAR</constant></entry>
1338
-
<entry valign="top">
1339
-
The name of a file to save all internal cookies to when the handle is closed,
1340
-
e.g. after a call to curl_close.
1341
-
</entry>
1342
-
<entry valign="top">
1343
-
</entry>
1344
-
</row>
1345
-
<row>
1346
-
<entry valign="top"><constant>CURLOPT_COOKIELIST</constant></entry>
1347
-
<entry valign="top">
1348
-
A cookie string (i.e. a single line in Netscape/Mozilla format, or a regular
1349
-
HTTP-style Set-Cookie header) adds that single cookie to the internal cookie store.
1350
-
<literal>"ALL"</literal> erases all cookies held in memory.
1351
-
<literal>"SESS"</literal> erases all session cookies held in memory.
1352
-
<literal>"FLUSH"</literal> writes all known cookies to the file specified by <constant>CURLOPT_COOKIEJAR</constant>.
1353
-
<literal>"RELOAD"</literal> loads all cookies from the files specified by <constant>CURLOPT_COOKIEFILE</constant>.
1354
-
</entry>
1355
-
<entry valign="top">
1356
-
Available since cURL 7.14.1.
1357
-
</entry>
1358
-
</row>
1359
-
<row>
1360
-
<entry valign="top"><constant>CURLOPT_CUSTOMREQUEST</constant></entry>
1361
-
<entry valign="top"><para>
1362
-
A custom request method to use instead of
1363
-
<literal>"GET"</literal> or <literal>"HEAD"</literal> when doing
1364
-
a HTTP request. This is useful for doing
1365
-
<literal>"DELETE"</literal> or other, more obscure HTTP requests.
1366
-
Valid values are things like <literal>"GET"</literal>,
1367
-
<literal>"POST"</literal>, <literal>"CONNECT"</literal> and so on;
1368
-
i.e. Do not enter a whole HTTP request line here. For instance,
1369
-
entering <literal>"GET /index.html HTTP/1.0\r\n\r\n"</literal>
1370
-
would be incorrect.
1371
-
<note>
1372
-
<para>
1373
-
Don't do this without making sure the server supports the custom
1374
-
request method first.
1375
-
</para>
1376
-
</note>
1377
-
</para></entry>
1378
-
<entry valign="top">
1379
-
</entry>
1380
-
</row>
1381
-
<row>
1382
-
<entry valign="top"><constant>CURLOPT_DEFAULT_PROTOCOL</constant></entry>
1383
-
<entry valign="top"><para>
1384
-
The default protocol to use if the URL is missing a scheme name.
1385
-
</para></entry>
1386
-
<entry valign="top">
1387
-
Added in cURL 7.45.0. Available since PHP 7.0.7.
1388
-
</entry>
1389
-
</row>
1390
-
<row>
1391
-
<entry valign="top"><constant>CURLOPT_DNS_INTERFACE</constant></entry>
1392
-
<entry valign="top"><para>
1393
-
Set the name of the network interface that the DNS resolver should bind to.
1394
-
This must be an interface name (not an address).
1395
-
</para></entry>
1396
-
<entry valign="top">
1397
-
Added in cURL 7.33.0. Available since PHP 7.0.7.
1398
-
</entry>
1399
-
</row>
1400
-
<row>
1401
-
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP4</constant></entry>
1402
-
<entry valign="top"><para>
1403
-
Set the local IPv4 address that the resolver should bind to. The argument
1404
-
should contain a single numerical IPv4 address as a string.
1405
-
</para></entry>
1406
-
<entry valign="top">
1407
-
Added in cURL 7.33.0. Available since PHP 7.0.7.
1408
-
</entry>
1409
-
</row>
1410
-
<row>
1411
-
<entry valign="top"><constant>CURLOPT_DNS_LOCAL_IP6</constant></entry>
1412
-
<entry valign="top"><para>
1413
-
Set the local IPv6 address that the resolver should bind to. The argument
1414
-
should contain a single numerical IPv6 address as a string.
1415
-
</para></entry>
1416
-
<entry valign="top">
1417
-
Added in cURL 7.33.0. Available since PHP 7.0.7.
1418
-
</entry>
1419
-
</row>
1420
-
<row>
1421
-
<entry valign="top"><constant>CURLOPT_EGDSOCKET</constant></entry>
1422
-
<entry valign="top">
1423
-
Like <constant>CURLOPT_RANDOM_FILE</constant>, except a filename
1424
-
to an Entropy Gathering Daemon socket.
1425
-
</entry>
1426
-
<entry valign="top">
1427
-
</entry>
1428
-
</row>
1429
-
<row>
1430
-
<entry valign="top"><constant>CURLOPT_ENCODING</constant></entry>
1431
-
<entry valign="top">
1432
-
The contents of the <literal>"Accept-Encoding: "</literal> header.
1433
-
This enables decoding of the response. Supported encodings are
1434
-
<literal>"identity"</literal>, <literal>"deflate"</literal>, and
1435
-
<literal>"gzip"</literal>. If an empty string, <literal>""</literal>,
1436
-
is set, a header containing all supported encoding types is sent.
1437
-
</entry>
1438
-
<entry valign="top">
1439
-
Added in cURL 7.10.
1440
-
</entry>
1441
-
</row>
1442
-
<row>
1443
-
<entry valign="top"><constant>CURLOPT_FTPPORT</constant></entry>
1444
-
<entry valign="top">
1445
-
The value which will be used to get the IP address to use
1446
-
for the FTP "PORT" instruction. The "PORT" instruction tells
1447
-
the remote server to connect to our specified IP address. The
1448
-
string may be a plain IP address, a hostname, a network
1449
-
interface name (under Unix), or just a plain '-' to use the
1450
-
systems default IP address.
1451
-
</entry>
1452
-
<entry valign="top">
1453
-
</entry>
1454
-
</row>
1455
-
<row>
1456
-
<entry valign="top"><constant>CURLOPT_INTERFACE</constant></entry>
1457
-
<entry valign="top">
1458
-
The name of the outgoing network interface to use. This can be an
1459
-
interface name, an IP address or a host name.
1460
-
</entry>
1461
-
<entry valign="top">
1462
-
</entry>
1463
-
</row>
1464
-
<row>
1465
-
<entry valign="top"><constant>CURLOPT_KEYPASSWD</constant></entry>
1466
-
<entry valign="top">
1467
-
The password required to use the <constant>CURLOPT_SSLKEY</constant>
1468
-
or <constant>CURLOPT_SSH_PRIVATE_KEYFILE</constant> private key.
1469
-
</entry>
1470
-
<entry valign="top">
1471
-
Added in cURL 7.16.1.
1472
-
</entry>
1473
-
</row>
1474
-
<row>
1475
-
<entry valign="top"><constant>CURLOPT_KRB4LEVEL</constant></entry>
1476
-
<entry valign="top">
1477
-
The KRB4 (Kerberos 4) security level. Any of the following values
1478
-
(in order from least to most powerful) are valid:
1479
-
<literal>"clear"</literal>,
1480
-
<literal>"safe"</literal>,
1481
-
<literal>"confidential"</literal>,
1482
-
<literal>"private".</literal>.
1483
-
If the string does not match one of these,
1484
-
<literal>"private"</literal> is used. Setting this option to &null;
1485
-
will disable KRB4 security. Currently KRB4 security only works
1486
-
with FTP transactions.
1487
-
</entry>
1488
-
<entry valign="top">
1489
-
</entry>
1490
-
</row>
1491
-
<row>
1492
-
<entry valign="top"><constant>CURLOPT_LOGIN_OPTIONS</constant></entry>
1493
-
<entry valign="top">
1494
-
Can be used to set protocol specific login options, such as the
1495
-
preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
1496
-
and should be used in conjunction with the
1497
-
<constant>CURLOPT_USERNAME</constant> option.
1498
-
</entry>
1499
-
<entry valign="top">
1500
-
Added in cURL 7.34.0. Available since PHP 7.0.7.
1501
-
</entry>
1502
-
</row>
1503
-
<row>
1504
-
<entry valign="top"><constant>CURLOPT_PINNEDPUBLICKEY</constant></entry>
1505
-
<entry valign="top">
1506
-
Set the pinned public key.
1507
-
The string can be the file name of your pinned public key. The file
1508
-
format expected is "PEM" or "DER". The string can also be any
1509
-
number of base64 encoded sha256 hashes preceded by "sha256//" and
1510
-
separated by ";".
1511
-
</entry>
1512
-
<entry valign="top">
1513
-
Added in cURL 7.39.0. Available since PHP 7.0.7.
1514
-
</entry>
1515
-
</row>
1516
-
<row>
1517
-
<entry valign="top"><constant>CURLOPT_POSTFIELDS</constant></entry>
1518
-
<entry valign="top">
1519
-
<simpara>
1520
-
The full data to post in a HTTP "POST" operation.
1521
-
This parameter can either be
1522
-
passed as a urlencoded string like '<literal>para1=val1&para2=val2&...</literal>'
1523
-
or as an array with the field name as key and field data as value.
1524
-
If <parameter>value</parameter> is an array, the
1525
-
<literal>Content-Type</literal> header will be set to
1526
-
<literal>multipart/form-data</literal>.
1527
-
</simpara>
1528
-
<simpara>
1529
-
Files can be sent using <classname>CURLFile</classname> or <classname>CURLStringFile</classname>,
1530
-
in which case <parameter>value</parameter> must be an array.
1531
-
</simpara>
1532
-
</entry>
1533
-
<entry valign="top">
1534
-
</entry>
1535
-
</row>
1536
-
<row>
1537
-
<entry valign="top"><constant>CURLOPT_PRIVATE</constant></entry>
1538
-
<entry valign="top">
1539
-
Any data that should be associated with this cURL handle. This data
1540
-
can subsequently be retrieved with the
1541
-
<constant>CURLINFO_PRIVATE</constant> option of
1542
-
<function>curl_getinfo</function>. cURL does nothing with this data.
1543
-
When using a cURL multi handle, this private data is typically a
1544
-
unique key to identify a standard cURL handle.
1545
-
</entry>
1546
-
<entry valign="top">
1547
-
Added in cURL 7.10.3.
1548
-
</entry>
1549
-
</row>
1550
-
<row>
1551
-
<entry valign="top"><constant>CURLOPT_PRE_PROXY</constant></entry>
1552
-
<entry valign="top">
1553
-
Set a <type>string</type> holding the host name or dotted numerical
1554
-
IP address to be used as the preproxy that curl connects to before
1555
-
it connects to the HTTP(S) proxy specified in the
1556
-
<constant>CURLOPT_PROXY</constant> option for the upcoming request.
1557
-
The preproxy can only be a SOCKS proxy and it should be prefixed with
1558
-
<literal>[scheme]://</literal> to specify which kind of socks is used.
1559
-
A numerical IPv6 address must be written within [brackets].
1560
-
Setting the preproxy to an empty string explicitly disables the use of a preproxy.
1561
-
To specify port number in this string, append <literal>:[port]</literal>
1562
-
to the end of the host name. The proxy's port number may optionally be
1563
-
specified with the separate option <constant>CURLOPT_PROXYPORT</constant>.
1564
-
Defaults to using port 1080 for proxies if a port is not specified.
1565
-
</entry>
1566
-
<entry valign="top">
1567
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1568
-
</entry>
1569
-
</row>
1570
-
<row>
1571
-
<entry valign="top"><constant>CURLOPT_PROXY</constant></entry>
1572
-
<entry valign="top">
1573
-
The HTTP proxy to tunnel requests through.
1574
-
</entry>
1575
-
<entry valign="top">
1576
-
</entry>
1577
-
</row>
1578
-
<row>
1579
-
<entry valign="top"><constant>CURLOPT_PROXY_SERVICE_NAME</constant></entry>
1580
-
<entry valign="top">
1581
-
The proxy authentication service name.
1582
-
</entry>
1583
-
<entry valign="top">
1584
-
Added in cURL 7.43.0 for HTTP proxies, and in cURL 7.49.0 for SOCKS5 proxies.
1585
-
Available since PHP 7.0.7.
1586
-
</entry>
1587
-
</row>
1588
-
<row>
1589
-
<entry valign="top"><constant>CURLOPT_PROXY_CAINFO</constant></entry>
1590
-
<entry valign="top">
1591
-
The path to proxy Certificate Authority (CA) bundle. Set the path as a
1592
-
<type>string</type> naming a file holding one or more certificates to
1593
-
verify the HTTPS proxy with.
1594
-
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1595
-
Defaults set to the system path where libcurl's cacert bundle is assumed
1596
-
to be stored.
1597
-
</entry>
1598
-
<entry valign="top">
1599
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1600
-
</entry>
1601
-
</row>
1602
-
<row>
1603
-
<entry valign="top"><constant>CURLOPT_PROXY_CAPATH</constant></entry>
1604
-
<entry valign="top">
1605
-
The directory holding multiple CA certificates to verify the HTTPS proxy with.
1606
-
</entry>
1607
-
<entry valign="top">
1608
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1609
-
</entry>
1610
-
</row>
1611
-
<row>
1612
-
<entry valign="top"><constant>CURLOPT_PROXY_CRLFILE</constant></entry>
1613
-
<entry valign="top">
1614
-
Set the file name with the concatenation of CRL (Certificate Revocation List)
1615
-
in PEM format to use in the certificate validation that occurs during
1616
-
the SSL exchange.
1617
-
</entry>
1618
-
<entry valign="top">
1619
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1620
-
</entry>
1621
-
</row>
1622
-
<row>
1623
-
<entry valign="top"><constant>CURLOPT_PROXY_KEYPASSWD</constant></entry>
1624
-
<entry valign="top">
1625
-
Set the string be used as the password required to use the
1626
-
<constant>CURLOPT_PROXY_SSLKEY</constant> private key. You never needed a
1627
-
passphrase to load a certificate but you need one to load your private key.
1628
-
This option is for connecting to an HTTPS proxy, not an HTTPS server.
1629
-
</entry>
1630
-
<entry valign="top">
1631
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1632
-
</entry>
1633
-
</row>
1634
-
<row>
1635
-
<entry valign="top"><constant>CURLOPT_PROXY_PINNEDPUBLICKEY</constant></entry>
1636
-
<entry valign="top">
1637
-
Set the pinned public key for HTTPS proxy. The string can be the file name
1638
-
of your pinned public key. The file format expected is "PEM" or "DER".
1639
-
The string can also be any number of base64 encoded sha256 hashes preceded by
1640
-
"sha256//" and separated by ";"
1641
-
</entry>
1642
-
<entry valign="top">
1643
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1644
-
</entry>
1645
-
</row>
1646
-
<row>
1647
-
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERT</constant></entry>
1648
-
<entry valign="top">
1649
-
The file name of your client certificate used to connect to the HTTPS proxy.
1650
-
The default format is "P12" on Secure Transport and "PEM" on other engines,
1651
-
and can be changed with <constant>CURLOPT_PROXY_SSLCERTTYPE</constant>.
1652
-
With NSS or Secure Transport, this can also be the nickname of the certificate
1653
-
you wish to authenticate with as it is named in the security database.
1654
-
If you want to use a file from the current directory, please precede it with
1655
-
"./" prefix, in order to avoid confusion with a nickname.
1656
-
</entry>
1657
-
<entry valign="top">
1658
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1659
-
</entry>
1660
-
</row>
1661
-
<row>
1662
-
<entry valign="top"><constant>CURLOPT_PROXY_SSLCERTTYPE</constant></entry>
1663
-
<entry valign="top">
1664
-
The format of your client certificate used when connecting to an HTTPS proxy.
1665
-
Supported formats are "PEM" and "DER", except with Secure Transport.
1666
-
OpenSSL (versions 0.9.3 and later) and Secure Transport
1667
-
(on iOS 5 or later, or OS X 10.7 or later) also support "P12" for
1668
-
PKCS#12-encoded files. Defaults to "PEM".
1669
-
</entry>
1670
-
<entry valign="top">
1671
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1672
-
</entry>
1673
-
</row>
1674
-
<row>
1675
-
<entry valign="top"><constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant></entry>
1676
-
<entry valign="top">
1677
-
The list of ciphers to use for the connection to the HTTPS proxy.
1678
-
The list must be syntactically correct, it consists of one or more cipher
1679
-
strings separated by colons. Commas or spaces are also acceptable separators
1680
-
but colons are normally used, !, - and + can be used as operators.
1681
-
</entry>
1682
-
<entry valign="top">
1683
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1684
-
</entry>
1685
-
</row>
1686
-
<row>
1687
-
<entry valign="top"><constant>CURLOPT_PROXY_TLS13_CIPHERS</constant></entry>
1688
-
<entry valign="top">
1689
-
The list of cipher suites to use for the TLS 1.3 connection to a proxy.
1690
-
The list must be syntactically correct, it consists of one or more
1691
-
cipher suite strings separated by colons. This option is currently used
1692
-
only when curl is built to use OpenSSL 1.1.1 or later.
1693
-
If you are using a different SSL backend you can try setting
1694
-
TLS 1.3 cipher suites by using the <constant>CURLOPT_PROXY_SSL_CIPHER_LIST</constant> option.
1695
-
</entry>
1696
-
<entry valign="top">
1697
-
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
1698
-
</entry>
1699
-
</row>
1700
-
<row>
1701
-
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEY</constant></entry>
1702
-
<entry valign="top">
1703
-
The file name of your private key used for connecting to the HTTPS proxy.
1704
-
The default format is "PEM" and can be changed with
1705
-
<constant>CURLOPT_PROXY_SSLKEYTYPE</constant>.
1706
-
(iOS and Mac OS X only) This option is ignored if curl was built against Secure Transport.
1707
-
</entry>
1708
-
<entry valign="top">
1709
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0. Available if built TLS enabled.
1710
-
</entry>
1711
-
</row>
1712
-
<row>
1713
-
<entry valign="top"><constant>CURLOPT_PROXY_SSLKEYTYPE</constant></entry>
1714
-
<entry valign="top">
1715
-
The format of your private key. Supported formats are "PEM", "DER" and "ENG".
1716
-
</entry>
1717
-
<entry valign="top">
1718
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1719
-
</entry>
1720
-
</row>
1721
-
<row>
1722
-
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant></entry>
1723
-
<entry valign="top">
1724
-
The password to use for the TLS authentication method specified with the
1725
-
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
1726
-
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> option to also be set.
1727
-
</entry>
1728
-
<entry valign="top">
1729
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1730
-
</entry>
1731
-
</row>
1732
-
<row>
1733
-
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant></entry>
1734
-
<entry valign="top">
1735
-
The method of the TLS authentication used for the HTTPS connection. Supported method is "SRP".
1736
-
<note>
1737
-
<para>
1738
-
Secure Remote Password (SRP) authentication for TLS provides mutual authentication
1739
-
if both sides have a shared secret. To use TLS-SRP, you must also set the
1740
-
<constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant> and
1741
-
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> options.
1742
-
</para>
1743
-
</note>
1744
-
</entry>
1745
-
<entry valign="top">
1746
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1747
-
</entry>
1748
-
</row>
1749
-
<row>
1750
-
<entry valign="top"><constant>CURLOPT_PROXY_TLSAUTH_USERNAME</constant></entry>
1751
-
<entry valign="top">
1752
-
The username to use for the HTTPS proxy TLS authentication method specified with the
1753
-
<constant>CURLOPT_PROXY_TLSAUTH_TYPE</constant> option. Requires that the
1754
-
<constant>CURLOPT_PROXY_TLSAUTH_PASSWORD</constant> option to also be set.
1755
-
</entry>
1756
-
<entry valign="top">
1757
-
Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
1758
-
</entry>
1759
-
</row>
1760
-
<row>
1761
-
<entry valign="top"><constant>CURLOPT_PROXYUSERPWD</constant></entry>
1762
-
<entry valign="top">
1763
-
A username and password formatted as
1764
-
<literal>"[username]:[password]"</literal> to use for the
1765
-
connection to the proxy.
1766
-
</entry>
1767
-
<entry valign="top">
1768
-
</entry>
1769
-
</row>
1770
-
<row>
1771
-
<entry valign="top"><constant>CURLOPT_RANDOM_FILE</constant></entry>
1772
-
<entry valign="top">
1773
-
A filename to be used to seed the random number generator for SSL.
1774
-
</entry>
1775
-
<entry valign="top">
1776
-
</entry>
1777
-
</row>
1778
-
<row>
1779
-
<entry valign="top"><constant>CURLOPT_RANGE</constant></entry>
1780
-
<entry valign="top">
1781
-
Range(s) of data to retrieve in the format
1782
-
<literal>"X-Y"</literal> where X or Y are optional. HTTP transfers
1783
-
also support several intervals, separated with commas in the format
1784
-
<literal>"X-Y,N-M"</literal>.
1785
-
</entry>
1786
-
<entry valign="top">
1787
-
</entry>
1788
-
</row>
1789
-
<row>
1790
-
<entry valign="top"><constant>CURLOPT_REFERER</constant></entry>
1791
-
<entry valign="top">
1792
-
The contents of the <literal>"Referer: "</literal> header to be used
1793
-
in a HTTP request.
1794
-
</entry>
1795
-
<entry valign="top">
1796
-
</entry>
1797
-
</row>
1798
-
<row>
1799
-
<entry valign="top"><constant>CURLOPT_SERVICE_NAME</constant></entry>
1800
-
<entry valign="top">
1801
-
The authentication service name.
1802
-
</entry>
1803
-
<entry valign="top">
1804
-
Added in cURL 7.43.0. Available since PHP 7.0.7.
1805
-
</entry>
1806
-
</row>
1807
-
<row>
1808
-
<entry valign="top"><constant>CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</constant></entry>
1809
-
<entry valign="top">
1810
-
A string containing 32 hexadecimal digits. The string should be the
1811
-
MD5 checksum of the remote host's public key, and libcurl will reject
1812
-
the connection to the host unless the md5sums match.
1813
-
This option is only for SCP and SFTP transfers.
1814
-
</entry>
1815
-
<entry valign="top">
1816
-
Added in cURL 7.17.1.
1817
-
</entry>
1818
-
</row>
1819
-
<row>
1820
-
<entry valign="top"><constant>CURLOPT_SSH_PUBLIC_KEYFILE</constant></entry>
1821
-
<entry valign="top">
1822
-
The file name for your public key. If not used, libcurl defaults to
1823
-
$HOME/.ssh/id_dsa.pub if the HOME environment variable is set,
1824
-
and just "id_dsa.pub" in the current directory if HOME is not set.
1825
-
</entry>
1826
-
<entry valign="top">
1827
-
Added in cURL 7.16.1.
1828
-
</entry>
1829
-
</row>
1830
-
<row>
1831
-
<entry valign="top"><constant>CURLOPT_SSH_PRIVATE_KEYFILE</constant></entry>
1832
-
<entry valign="top">
1833
-
The file name for your private key. If not used, libcurl defaults to
1834
-
$HOME/.ssh/id_dsa if the HOME environment variable is set,
1835
-
and just "id_dsa" in the current directory if HOME is not set.
1836
-
If the file is password-protected, set the password with
1837
-
<constant>CURLOPT_KEYPASSWD</constant>.
1838
-
</entry>
1839
-
<entry valign="top">
1840
-
Added in cURL 7.16.1.
1841
-
</entry>
1842
-
</row>
1843
-
<row>
1844
-
<entry valign="top"><constant>CURLOPT_SSL_CIPHER_LIST</constant></entry>
1845
-
<entry valign="top">
1846
-
A list of ciphers to use for SSL. For example,
1847
-
<literal>RC4-SHA</literal> and <literal>TLSv1</literal> are valid
1848
-
cipher lists.
1849
-
</entry>
1850
-
<entry valign="top">
1851
-
</entry>
1852
-
</row>
1853
-
<row>
1854
-
<entry valign="top"><constant>CURLOPT_SSLCERT</constant></entry>
1855
-
<entry valign="top">
1856
-
The name of a file containing a PEM formatted certificate.
1857
-
</entry>
1858
-
<entry valign="top">
1859
-
</entry>
1860
-
</row>
1861
-
<row>
1862
-
<entry valign="top"><constant>CURLOPT_SSLCERTPASSWD</constant></entry>
1863
-
<entry valign="top">
1864
-
The password required to use the
1865
-
<constant>CURLOPT_SSLCERT</constant> certificate.
1866
-
</entry>
1867
-
<entry valign="top">
1868
-
</entry>
1869
-
</row>
1870
-
<row>
1871
-
<entry valign="top"><constant>CURLOPT_SSLCERTTYPE</constant></entry>
1872
-
<entry valign="top">
1873
-
The format of the certificate. Supported formats are
1874
-
<literal>"PEM"</literal> (default), <literal>"DER"</literal>,
1875
-
and <literal>"ENG"</literal>.
1876
-
As of OpenSSL 0.9.3, <literal>"P12"</literal> (for PKCS#12-encoded files)
1877
-
is also supported.
1878
-
</entry>
1879
-
<entry valign="top">
1880
-
Added in cURL 7.9.3.
1881
-
</entry>
1882
-
</row>
1883
-
<row>
1884
-
<entry valign="top"><constant>CURLOPT_SSLENGINE</constant></entry>
1885
-
<entry valign="top">
1886
-
The identifier for the crypto engine of the private SSL key
1887
-
specified in <constant>CURLOPT_SSLKEY</constant>.
1888
-
</entry>
1889
-
<entry valign="top">
1890
-
</entry>
1891
-
</row>
1892
-
<row>
1893
-
<entry valign="top"><constant>CURLOPT_SSLENGINE_DEFAULT</constant></entry>
1894
-
<entry valign="top">
1895
-
The identifier for the crypto engine used for asymmetric crypto
1896
-
operations.
1897
-
</entry>
1898
-
<entry valign="top">
1899
-
</entry>
1900
-
</row>
1901
-
<row>
1902
-
<entry valign="top"><constant>CURLOPT_SSLKEY</constant></entry>
1903
-
<entry valign="top">
1904
-
The name of a file containing a private SSL key.
1905
-
</entry>
1906
-
<entry valign="top">
1907
-
</entry>
1908
-
</row>
1909
-
<row>
1910
-
<entry valign="top"><constant>CURLOPT_SSLKEYPASSWD</constant></entry>
1911
-
<entry valign="top"><para>
1912
-
The secret password needed to use the private SSL key specified in
1913
-
<constant>CURLOPT_SSLKEY</constant>.
1914
-
<note>
1915
-
<para>
1916
-
Since this option contains a sensitive password, remember to keep
1917
-
the PHP script it is contained within safe.
1918
-
</para>
1919
-
</note>
1920
-
</para></entry>
1921
-
<entry valign="top">
1922
-
</entry>
1923
-
</row>
1924
-
<row>
1925
-
<entry valign="top"><constant>CURLOPT_SSLKEYTYPE</constant></entry>
1926
-
<entry valign="top">
1927
-
The key type of the private SSL key specified in
1928
-
<constant>CURLOPT_SSLKEY</constant>. Supported key types are
1929
-
<literal>"PEM"</literal> (default), <literal>"DER"</literal>,
1930
-
and <literal>"ENG"</literal>.
1931
-
</entry>
1932
-
<entry valign="top">
1933
-
</entry>
1934
-
</row>
1935
-
<row>
1936
-
<entry valign="top"><constant>CURLOPT_TLS13_CIPHERS</constant></entry>
1937
-
<entry valign="top">
1938
-
The list of cipher suites to use for the TLS 1.3 connection. The list must be
1939
-
syntactically correct, it consists of one or more cipher suite strings separated by colons.
1940
-
This option is currently used only when curl is built to use OpenSSL 1.1.1 or later.
1941
-
If you are using a different SSL backend you can try setting
1942
-
TLS 1.3 cipher suites by using the <constant>CURLOPT_SSL_CIPHER_LIST</constant> option.
1943
-
</entry>
1944
-
<entry valign="top">
1945
-
Available since PHP 7.3.0 and libcurl >= cURL 7.61.0. Available when built with OpenSSL >= 1.1.1.
1946
-
</entry>
1947
-
</row>
1948
-
<row>
1949
-
<entry valign="top"><constant>CURLOPT_UNIX_SOCKET_PATH</constant></entry>
1950
-
<entry valign="top">
1951
-
Enables the use of Unix domain sockets as connection endpoint and
1952
-
sets the path to the given <type>string</type>.
1953
-
</entry>
1954
-
<entry valign="top">
1955
-
Added in cURL 7.40.0. Available since PHP 7.0.7.
1956
-
</entry>
1957
-
</row>
1958
-
<row>
1959
-
<entry valign="top"><constant>CURLOPT_URL</constant></entry>
1960
-
<entry valign="top">
1961
-
The URL to fetch. This can also be set when initializing a
1962
-
session with <function>curl_init</function>.
1963
-
</entry>
1964
-
<entry valign="top">
1965
-
</entry>
1966
-
</row>
1967
-
<row>
1968
-
<entry valign="top"><constant>CURLOPT_USERAGENT</constant></entry>
1969
-
<entry valign="top">
1970
-
The contents of the <literal>"User-Agent: "</literal> header to be
1971
-
used in a HTTP request.
1972
-
</entry>
1973
-
<entry valign="top">
1974
-
</entry>
1975
-
</row>
1976
-
<row>
1977
-
<entry valign="top"><constant>CURLOPT_USERNAME</constant></entry>
1978
-
<entry valign="top">
1979
-
The user name to use in authentication.
1980
-
</entry>
1981
-
<entry valign="top">
1982
-
Added in cURL 7.19.1.
1983
-
</entry>
1984
-
</row>
1985
-
<row>
1986
-
<entry valign="top"><constant>CURLOPT_PASSWORD</constant></entry>
1987
-
<entry valign="top">
1988
-
The password to use in authentication.
1989
-
</entry>
1990
-
<entry valign="top">
1991
-
Added in cURL 7.19.1.
1992
-
</entry>
1993
-
</row>
1994
-
<row>
1995
-
<entry valign="top"><constant>CURLOPT_USERPWD</constant></entry>
1996
-
<entry valign="top">
1997
-
A username and password formatted as
1998
-
<literal>"[username]:[password]"</literal> to use for the
1999
-
connection.
2000
-
</entry>
2001
-
<entry valign="top">
2002
-
</entry>
2003
-
</row>
2004
-
<row>
2005
-
<entry valign="top"><constant>CURLOPT_XOAUTH2_BEARER</constant></entry>
2006
-
<entry valign="top">
2007
-
Specifies the OAuth 2.0 access token.
2008
-
</entry>
2009
-
<entry valign="top">
2010
-
Added in cURL 7.33.0. Available since PHP 7.0.7.
2011
-
</entry>
2012
-
</row>
2013
-
</tbody>
2014
-
</tgroup>
2015
-
</informaltable>
2016
-
</para>
2017
-
<para>
2018
-
<parameter>value</parameter> should be an array for the
2019
-
following values of the <parameter>option</parameter> parameter:
2020
-
<informaltable>
2021
-
<tgroup cols="3">
2022
-
<thead>
2023
-
<row>
2024
-
<entry>Option</entry>
2025
-
<entry>Set <parameter>value</parameter> to</entry>
2026
-
<entry>Notes</entry>
2027
-
</row>
2028
-
</thead>
2029
-
<tbody>
2030
-
<row>
2031
-
<entry valign="top"><constant>CURLOPT_CONNECT_TO</constant></entry>
2032
-
<entry valign="top">
2033
-
Connect to a specific host and port instead of the URL's host and port.
2034
-
Accepts an array of strings with the format
2035
-
<literal>HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT</literal>.
2036
-
</entry>
2037
-
<entry valign="top">
2038
-
Added in cURL 7.49.0. Available since PHP 7.0.7.
2039
-
</entry>
2040
-
</row>
2041
-
<row>
2042
-
<entry valign="top"><constant>CURLOPT_HTTP200ALIASES</constant></entry>
2043
-
<entry valign="top">
2044
-
An array of HTTP 200 responses that will be treated as valid
2045
-
responses and not as errors.
2046
-
</entry>
2047
-
<entry valign="top">
2048
-
Added in cURL 7.10.3.
2049
-
</entry>
2050
-
</row>
2051
-
<row>
2052
-
<entry valign="top"><constant>CURLOPT_HTTPHEADER</constant></entry>
2053
-
<entry valign="top">
2054
-
An array of HTTP header fields to set, in the format
2055
-
<code>
2056
-
array('Content-type: text/plain', 'Content-length: 100')
2057
-
</code>
2058
-
</entry>
2059
-
<entry valign="top">
2060
-
</entry>
2061
-
</row>
2062
-
<row>
2063
-
<entry valign="top"><constant>CURLOPT_POSTQUOTE</constant></entry>
2064
-
<entry valign="top">
2065
-
An array of FTP commands to execute on the server after the FTP
2066
-
request has been performed.
2067
-
</entry>
2068
-
<entry valign="top">
2069
-
</entry>
2070
-
</row>
2071
-
<row>
2072
-
<entry valign="top"><constant>CURLOPT_PROXYHEADER</constant></entry>
2073
-
<entry valign="top">
2074
-
An array of custom HTTP headers to pass to proxies.
2075
-
</entry>
2076
-
<entry valign="top">
2077
-
Added in cURL 7.37.0. Available since PHP 7.0.7.
2078
-
</entry>
2079
-
</row>
2080
-
<row>
2081
-
<entry valign="top"><constant>CURLOPT_QUOTE</constant></entry>
2082
-
<entry valign="top">
2083
-
An array of FTP commands to execute on the server prior to the FTP
2084
-
request.
2085
-
</entry>
2086
-
<entry valign="top">
2087
-
</entry>
2088
-
</row>
2089
-
<row>
2090
-
<entry valign="top"><constant>CURLOPT_RESOLVE</constant></entry>
2091
-
<entry valign="top">
2092
-
Provide a custom address for a specific host and port pair. An array
2093
-
of hostname, port, and IP address strings, each element separated by
2094
-
a colon. In the format:
2095
-
<code>
2096
-
array("example.com:80:127.0.0.1")
2097
-
</code>
2098
-
</entry>
2099
-
<entry valign="top">
2100
-
Added in cURL 7.21.3.
2101
-
</entry>
2102
-
</row>
2103
-
</tbody>
2104
-
</tgroup>
2105
-
</informaltable>
2106
-
</para>
2107
-
<para>
2108
-
<parameter>value</parameter> should be a stream resource (using
2109
-
<function>fopen</function>, for example) for the following values of the
2110
-
<parameter>option</parameter> parameter:
2111
-
<informaltable>
2112
-
<tgroup cols="3">
2113
-
<thead>
2114
-
<row>
2115
-
<entry>Option</entry>
2116
-
<entry>Set <parameter>value</parameter> to</entry>
2117
-
</row>
2118
-
</thead>
2119
-
<tbody>
2120
-
<row>
2121
-
<entry valign="top"><constant>CURLOPT_FILE</constant></entry>
2122
-
<entry valign="top">
2123
-
The file that the transfer should be written to. The default
2124
-
is <literal>STDOUT</literal> (the browser window).
2125
-
</entry>
2126
-
</row>
2127
-
<row>
2128
-
<entry valign="top"><constant>CURLOPT_INFILE</constant></entry>
2129
-
<entry valign="top">
2130
-
The file that the transfer should be read from when uploading.
2131
-
</entry>
2132
-
</row>
2133
-
<row>
2134
-
<entry valign="top"><constant>CURLOPT_STDERR</constant></entry>
2135
-
<entry valign="top">
2136
-
An alternative location to output errors to instead of
2137
-
<literal>STDERR</literal>.
2138
-
</entry>
2139
-
</row>
2140
-
<row>
2141
-
<entry valign="top"><constant>CURLOPT_WRITEHEADER</constant></entry>
2142
-
<entry valign="top">
2143
-
The file that the header part of the transfer is written to.
2144
-
</entry>
2145
-
</row>
2146
-
</tbody>
2147
-
</tgroup>
2148
-
</informaltable>
2149
-
</para>
2150
-
<para>
2151
-
<parameter>value</parameter> should be the name of a valid function or a Closure
2152
-
for the following values of the <parameter>option</parameter> parameter:
2153
-
<informaltable>
2154
-
<tgroup cols="3">
2155
-
<thead>
2156
-
<row>
2157
-
<entry>Option</entry>
2158
-
<entry>Set <parameter>value</parameter> to</entry>
2159
-
</row>
2160
-
</thead>
2161
-
<tbody>
2162
-
<row>
2163
-
<entry valign="top"><constant>CURLOPT_HEADERFUNCTION</constant></entry>
2164
-
<entry valign="top">
2165
-
A callback accepting two parameters.
2166
-
The first is the cURL resource, the second is a
2167
-
string with the header data to be written. The header data must
2168
-
be written by this callback. Return the number of
2169
-
bytes written.
2170
-
</entry>
2171
-
</row>
2172
-
<row>
2173
-
<entry valign="top"><constant>CURLOPT_PASSWDFUNCTION</constant></entry>
2174
-
<entry valign="top">
2175
-
A callback accepting three parameters.
2176
-
The first is the cURL resource, the second is a
2177
-
string containing a password prompt, and the third is the maximum
2178
-
password length. Return the string containing the password.
2179
-
</entry>
2180
-
</row>
2181
-
<row>
2182
-
<entry valign="top"><constant>CURLOPT_PROGRESSFUNCTION</constant></entry>
2183
-
<entry valign="top">
2184
-
<para>
2185
-
A callback accepting five parameters.
2186
-
The first is the cURL resource, the second is the total number of
2187
-
bytes expected to be downloaded in this transfer, the third is
2188
-
the number of bytes downloaded so far, the fourth is the total
2189
-
number of bytes expected to be uploaded in this transfer, and the
2190
-
fifth is the number of bytes uploaded so far.
2191
-
</para>
2192
-
<note>
2193
-
<para>
2194
-
The callback is only called when the <constant>CURLOPT_NOPROGRESS</constant>
2195
-
option is set to &false;.
2196
-
</para>
2197
-
</note>
2198
-
<para>
2199
-
Return a non-zero value to abort the transfer. In which case, the
2200
-
transfer will set a <constant>CURLE_ABORTED_BY_CALLBACK</constant>
2201
-
error.
2202
-
</para>
2203
-
</entry>
2204
-
</row>
2205
-
<row>
2206
-
<entry valign="top"><constant>CURLOPT_READFUNCTION</constant></entry>
2207
-
<entry valign="top">
2208
-
A callback accepting three parameters.
2209
-
The first is the cURL resource, the second is a
2210
-
stream resource provided to cURL through the option
2211
-
<constant>CURLOPT_INFILE</constant>, and the third is the maximum
2212
-
amount of data to be read. The callback must return a string
2213
-
with a length equal or smaller than the amount of data requested,
2214
-
typically by reading it from the passed stream resource. It should
2215
-
return an empty string to signal <literal>EOF</literal>.
2216
-
</entry>
2217
-
</row>
2218
-
<row>
2219
-
<entry valign="top"><constant>CURLOPT_WRITEFUNCTION</constant></entry>
2220
-
<entry valign="top">
2221
-
A callback accepting two parameters.
2222
-
The first is the cURL resource, and the second is a
2223
-
string with the data to be written. The data must be saved by
2224
-
this callback. It must return the exact number of bytes written
2225
-
or the transfer will be aborted with an error.
2226
-
</entry>
2227
-
</row>
2228
-
</tbody>
2229
-
</tgroup>
2230
-
</informaltable>
2231
-
</para>
2232
-
<para>
2233
-
Other values:
2234
-
<informaltable>
2235
-
<tgroup cols="3">
2236
-
<thead>
2237
-
<row>
2238
-
<entry>Option</entry>
2239
-
<entry>Set <parameter>value</parameter> to</entry>
2240
-
</row>
2241
-
</thead>
2242
-
<tbody>
2243
-
<row>
2244
-
<entry valign="top"><constant>CURLOPT_SHARE</constant></entry>
2245
-
<entry valign="top">
2246
-
A result of <function>curl_share_init</function>. Makes the cURL
2247
-
handle to use the data from the shared handle.
2248
-
</entry>
2249
-
</row>
2250
-
</tbody>
2251
-
</tgroup>
2252
-
</informaltable>
40
+
See the description of the
41
+
<constant>CURLOPT_<replaceable>*</replaceable></constant> constants
42
+
for details on the type of values each constant expects.
2253
43
</para>
2254
44
</listitem>
2255
45
</varlistentry>
...
...
@@ -2276,11 +66,18 @@
2276
66
</row>
2277
67
</thead>
2278
68
<tbody>
69
+
<row>
70
+
<entry>8.4.0</entry>
71
+
<entry>
72
+
<constant>CURLOPT_DNS_USE_GLOBAL_CACHE</constant> no longer has any effect,
73
+
and enabling it on thread-safe PHP builds no longer triggers a warning.
74
+
</entry>
75
+
</row>
2279
76
&curl.changelog.handle-param;
2280
77
<row>
2281
78
<entry>7.3.15, 7.4.3</entry>
2282
79
<entry>
2283
-
Introduced <constant>CURLOPT_HTTP09_ALLOWED </constant>.
80
+
Introduced <constant>CURLOPT_HTTP09_ALLOWED</constant>.
2284
81
</entry>
2285
82
</row>
2286
83
<row>
2287
84