-
Notifications
You must be signed in to change notification settings - Fork 7
/
curl.php
2382 lines (2295 loc) · 70.5 KB
/
curl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of curl v.7.0.4-7ubuntu2
/**
* <b>CURLFile</b> should be used to upload a file with
* <b>CURLOPT_POSTFIELDS</b>.
* @link http://php.net/manual/en/class.curlfile.php
*/
class CURLFile {
public $name;
public $mime;
public $postname;
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Create a CURLFile object
* @link http://php.net/manual/en/curlfile.construct.php
* @param string $filename <p>
* Path to the file which will be uploaded.
* </p>
* @param string $mimetype [optional] <p>
* Mimetype of the file.
* </p>
* @param string $postname [optional] <p>
* Name of the file to be used in the upload data.
* </p>
*/
public function __construct(string $filename, string $mimetype = null, string $postname = null) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Get file name
* @link http://php.net/manual/en/curlfile.getfilename.php
* @return string file name.
*/
public function getFilename(): string {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Get MIME type
* @link http://php.net/manual/en/curlfile.getmimetype.php
* @return string MIME type.
*/
public function getMimeType(): string {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Set MIME type
* @link http://php.net/manual/en/curlfile.setmimetype.php
* @param string $mime <p>
* MIME type to be used in POST data.
* </p>
* @return void No value is returned.
*/
public function setMimeType(string $mime) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Get file name for POST
* @link http://php.net/manual/en/curlfile.getpostfilename.php
* @return string file name for POST.
*/
public function getPostFilename(): string {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Set file name for POST
* @link http://php.net/manual/en/curlfile.setpostfilename.php
* @param string $postname <p>
* Filename to be used in POST data.
* </p>
* @return void No value is returned.
*/
public function setPostFilename(string $postname) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Unserialization handler
* @link http://php.net/manual/en/curlfile.wakeup.php
* @return void No value is returned.
*/
public function __wakeup() {}
}
/**
* (PHP 4 >= 4.0.2, PHP 5, PHP 7)<br/>
* Initialize a cURL session
* @link http://php.net/manual/en/function.curl-init.php
* @param string $url [optional] <p>
* If provided, the <b>CURLOPT_URL</b> option will be set
* to its value. You can manually set this using the
* <b>curl_setopt</b> function.
* </p>
* <p>
* The file protocol is disabled by cURL if
* open_basedir is set.
* </p>
* @return resource a cURL handle on success, <b>FALSE</b> on errors.
*/
function curl_init(string $url = null) {}
/**
* (PHP 5, PHP 7)<br/>
* Copy a cURL handle along with all of its preferences
* @link http://php.net/manual/en/function.curl-copy-handle.php
* @param resource $ch
* @return resource a new cURL handle.
*/
function curl_copy_handle($ch) {}
/**
* (PHP 4 >= 4.0.2, PHP 5, PHP 7)<br/>
* Gets cURL version information
* @link http://php.net/manual/en/function.curl-version.php
* @param int $age [optional]
* @return array an associative array with the following elements:
* <tr valign="top">
* <td>Indice</td>
* <td>Value description</td>
* </tr>
* <tr valign="top">
* <td>version_number</td>
* <td>cURL 24 bit version number</td>
* </tr>
* <tr valign="top">
* <td>version</td>
* <td>cURL version number, as a string</td>
* </tr>
* <tr valign="top">
* <td>ssl_version_number</td>
* <td>OpenSSL 24 bit version number</td>
* </tr>
* <tr valign="top">
* <td>ssl_version</td>
* <td>OpenSSL version number, as a string</td>
* </tr>
* <tr valign="top">
* <td>libz_version</td>
* <td>zlib version number, as a string</td>
* </tr>
* <tr valign="top">
* <td>host</td>
* <td>Information about the host where cURL was built</td>
* </tr>
* <tr valign="top">
* <td>age</td>
* <td></td>
* </tr>
* <tr valign="top">
* <td>features</td>
* <td>A bitmask of the CURL_VERSION_XXX constants</td>
* </tr>
* <tr valign="top">
* <td>protocols</td>
* <td>An array of protocols names supported by cURL</td>
* </tr>
*/
function curl_version(int $age = CURLVERSION_NOW): array {}
/**
* (PHP 4 >= 4.0.2, PHP 5, PHP 7)<br/>
* Set an option for a cURL transfer
* @link http://php.net/manual/en/function.curl-setopt.php
* @param resource $ch
* @param int $option <p>
* The CURLOPT_XXX option to set.
* </p>
* @param mixed $value <p>
* The value to be set on <i>option</i>.
* </p>
* <p>
* <i>value</i> should be a bool for the
* following values of the <i>option</i> parameter:
* <tr valign="top">
* Option</td>
* Set <i>value</i> to</td>
* Notes</td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_AUTOREFERER</b></td>
* <b>TRUE</b> to automatically set the Referer: field in
* requests where it follows a Location: redirect.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_BINARYTRANSFER</b></td>
* <b>TRUE</b> to return the raw output when
* <b>CURLOPT_RETURNTRANSFER</b> is used.
* </td>
* From PHP 5.1.3, this option has no effect: the raw output will
* always be returned when
* <b>CURLOPT_RETURNTRANSFER</b> is used.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_COOKIESESSION</b></td>
* <b>TRUE</b> to mark this as a new cookie "session". It will force libcurl
* to ignore all cookies it is about to load that are "session cookies"
* from the previous session. By default, libcurl always stores and
* loads all cookies, independent if they are session cookies or not.
* Session cookies are cookies without expiry date and they are meant
* to be alive and existing for this "session" only.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CERTINFO</b></td>
* <b>TRUE</b> to output SSL certification information to STDERR
* on secure transfers.
* </td>
* Added in cURL 7.19.1.
* Available since PHP 5.3.2.
* Requires <b>CURLOPT_VERBOSE</b> to be on to have an effect.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CONNECT_ONLY</b></td>
* <b>TRUE</b> tells the library to perform all the required proxy authentication
* and connection setup, but no data transfer. This option is implemented for
* HTTP, SMTP and POP3.
* </td>
* Added in 7.15.2.
* Available since PHP 5.5.0.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CRLF</b></td>
* <b>TRUE</b> to convert Unix newlines to CRLF newlines
* on transfers.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_DNS_USE_GLOBAL_CACHE</b></td>
* <b>TRUE</b> to use a global DNS cache. This option is
* not thread-safe and is enabled by default.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FAILONERROR</b></td>
* <b>TRUE</b> to fail verbosely if the HTTP code returned
* is greater than or equal to 400. The default behavior is to return
* the page normally, ignoring the code.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FILETIME</b></td>
* <b>TRUE</b> to attempt to retrieve the modification
* date of the remote document. This value can be retrieved using
* the <i>CURLINFO_FILETIME</i> option with
* <b>curl_getinfo</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FOLLOWLOCATION</b></td>
* <b>TRUE</b> to follow any
* "Location: " header that the server sends as
* part of the HTTP header (note this is recursive, PHP will follow as
* many "Location: " headers that it is sent,
* unless <b>CURLOPT_MAXREDIRS</b> is set).
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FORBID_REUSE</b></td>
* <b>TRUE</b> to force the connection to explicitly
* close when it has finished processing, and not be pooled for reuse.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FRESH_CONNECT</b></td>
* <b>TRUE</b> to force the use of a new connection
* instead of a cached one.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTP_USE_EPRT</b></td>
* <b>TRUE</b> to use EPRT (and LPRT) when doing active
* FTP downloads. Use <b>FALSE</b> to disable EPRT and LPRT and use PORT
* only.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTP_USE_EPSV</b></td>
* <b>TRUE</b> to first try an EPSV command for FTP
* transfers before reverting back to PASV. Set to <b>FALSE</b>
* to disable EPSV.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTP_CREATE_MISSING_DIRS</b></td>
* <b>TRUE</b> to create missing directories when an FTP operation
* encounters a path that currently doesn't exist.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTPAPPEND</b></td>
* <b>TRUE</b> to append to the remote file instead of
* overwriting it.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TCP_NODELAY</b></td>
* <b>TRUE</b> to disable TCP's Nagle algorithm, which tries to minimize
* the number of small packets on the network.
* </td>
* Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or
* greater.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTPASCII</b></td>
* An alias of
* <b>CURLOPT_TRANSFERTEXT</b>. Use that instead.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTPLISTONLY</b></td>
* <b>TRUE</b> to only list the names of an FTP
* directory.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_HEADER</b></td>
* <b>TRUE</b> to include the header in the output.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <td><b>CURLINFO_HEADER_OUT</b></td>
* <b>TRUE</b> to track the handle's request string.
* </td>
* Available since PHP 5.1.3. The <b>CURLINFO_</b>
* prefix is intentional.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_HTTPGET</b></td>
* <b>TRUE</b> to reset the HTTP request method to GET.
* Since GET is the default, this is only necessary if the request
* method has been changed.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_HTTPPROXYTUNNEL</b></td>
* <b>TRUE</b> to tunnel through a given HTTP proxy.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_MUTE</b></td>
* <b>TRUE</b> to be completely silent with regards to
* the cURL functions.
* </td>
* Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead)
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_NETRC</b></td>
* <b>TRUE</b> to scan the ~/.netrc
* file to find a username and password for the remote site that
* a connection is being established with.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_NOBODY</b></td>
* <b>TRUE</b> to exclude the body from the output.
* Request method is then set to HEAD. Changing this to <b>FALSE</b> does
* not change it to GET.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_NOPROGRESS</b></td>
* <p>
* <b>TRUE</b> to disable the progress meter for cURL transfers.
* <p>
* PHP automatically sets this option to <b>TRUE</b>, this should only be
* changed for debugging purposes.
* </p>
* </p></td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_NOSIGNAL</b></td>
* <b>TRUE</b> to ignore any cURL function that causes a
* signal to be sent to the PHP process. This is turned on by default
* in multi-threaded SAPIs so timeout options can still be used.
* </td>
* Added in cURL 7.10.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_POST</b></td>
* <b>TRUE</b> to do a regular HTTP POST. This POST is the
* normal application/x-www-form-urlencoded kind,
* most commonly used by HTML forms.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PUT</b></td>
* <b>TRUE</b> to HTTP PUT a file. The file to PUT must
* be set with <b>CURLOPT_INFILE</b> and
* <b>CURLOPT_INFILESIZE</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_RETURNTRANSFER</b></td>
* <b>TRUE</b> to return the transfer as a string of the
* return value of <b>curl_exec</b> instead of outputting
* it out directly.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_SAFE_UPLOAD</b></td>
* <b>TRUE</b> to disable support for the @ prefix for
* uploading files in <b>CURLOPT_POSTFIELDS</b>, which
* means that values starting with @ can be safely
* passed as fields. <b>CURLFile</b> may be used for
* uploads instead.
* </td>
* Added in PHP 5.5.0 with <b>FALSE</b> as the default value. PHP 5.6.0
* changes the default value to <b>TRUE</b>.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_SSL_VERIFYPEER</b></td>
* <b>FALSE</b> to stop cURL from verifying the peer's
* certificate. Alternate certificates to verify against can be
* specified with the <b>CURLOPT_CAINFO</b> option
* or a certificate directory can be specified with the
* <b>CURLOPT_CAPATH</b> option.
* </td>
* <b>TRUE</b> by default as of cURL 7.10. Default bundle installed as of
* cURL 7.10.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TRANSFERTEXT</b></td>
* <b>TRUE</b> to use ASCII mode for FTP transfers.
* For LDAP, it retrieves data in plain text instead of HTML. On
* Windows systems, it will not set STDOUT to binary
* mode.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_UNRESTRICTED_AUTH</b></td>
* <b>TRUE</b> to keep sending the username and password
* when following locations (using
* <b>CURLOPT_FOLLOWLOCATION</b>), even when the
* hostname has changed.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_UPLOAD</b></td>
* <b>TRUE</b> to prepare for an upload.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_VERBOSE</b></td>
* <b>TRUE</b> to output verbose information. Writes
* output to STDERR, or the file specified using
* <b>CURLOPT_STDERR</b>.
* </td>
* </td>
* </tr>
* </p>
* <p>
* <i>value</i> should be an integer for the
* following values of the <i>option</i> parameter:
* <tr valign="top">
* <td>Option</td>
* <td>Set <i>value</i> to</td>
* <td>Notes</td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_BUFFERSIZE</b></td>
* The size of the buffer to use for each read. There is no guarantee
* this request will be fulfilled, however.
* </td>
* Added in cURL 7.10.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CLOSEPOLICY</b></td>
* One of the <b>CURLCLOSEPOLICY_*</b> values.
* <p>
* This option is deprecated, as it was never implemented in cURL and
* never had any effect.
* </p>
* </td>
* Removed in PHP 5.6.0.
* </td>
* </tr>
* <tr valign="top">
* <td><b>CURLOPT_CONNECTTIMEOUT</b></td>
* The number of seconds to wait while trying to connect. Use 0 to
* wait indefinitely.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CONNECTTIMEOUT_MS</b></td>
* The number of milliseconds to wait while trying to connect. Use 0 to
* wait indefinitely.
* If libcurl is built to use the standard system name resolver, that
* portion of the connect will still use full-second resolution for
* timeouts with a minimum timeout allowed of one second.
* </td>
* Added in cURL 7.16.2. Available since PHP 5.2.3.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_DNS_CACHE_TIMEOUT</b></td>
* The number of seconds to keep DNS entries in memory. This
* option is set to 120 (2 minutes) by default.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTPSSLAUTH</b></td>
* The FTP authentication method (when is activated):
* CURLFTPAUTH_SSL (try SSL first),
* CURLFTPAUTH_TLS (try TLS first), or
* CURLFTPAUTH_DEFAULT (let cURL decide).
* </td>
* Added in cURL 7.12.2.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_HTTP_VERSION</b></td>
* <i>CURL_HTTP_VERSION_NONE</i> (default, lets CURL
* decide which version to use),
* <i>CURL_HTTP_VERSION_1_0</i> (forces HTTP/1.0),
* or <i>CURL_HTTP_VERSION_1_1</i> (forces HTTP/1.1).
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_HTTPAUTH</b></td>
* <p>
* The HTTP authentication method(s) to use. The options are:
* <i>CURLAUTH_BASIC</i>,
* <i>CURLAUTH_DIGEST</i>,
* <i>CURLAUTH_GSSNEGOTIATE</i>,
* <i>CURLAUTH_NTLM</i>,
* <i>CURLAUTH_ANY</i>, and
* <i>CURLAUTH_ANYSAFE</i>.
* </p>
* <p>
* The bitwise | (or) operator can be used to combine
* more than one method. If this is done, cURL will poll the server to see
* what methods it supports and pick the best one.
* </p>
* <p>
* <i>CURLAUTH_ANY</i> is an alias for
* CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM.
* </p>
* <p>
* <i>CURLAUTH_ANYSAFE</i> is an alias for
* CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM.
* </p>
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_INFILESIZE</b></td>
* The expected size, in bytes, of the file when uploading a file to
* a remote site. Note that using this option will not stop libcurl
* from sending more data, as exactly what is sent depends on
* <b>CURLOPT_READFUNCTION</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_LOW_SPEED_LIMIT</b></td>
* The transfer speed, in bytes per second, that the transfer should be
* below during the count of <b>CURLOPT_LOW_SPEED_TIME</b>
* seconds before PHP considers the transfer too slow and aborts.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_LOW_SPEED_TIME</b></td>
* The number of seconds the transfer speed should be below
* <b>CURLOPT_LOW_SPEED_LIMIT</b> before PHP considers
* the transfer too slow and aborts.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_MAXCONNECTS</b></td>
* The maximum amount of persistent connections that are allowed.
* When the limit is reached,
* <b>CURLOPT_CLOSEPOLICY</b> is used to determine
* which connection to close.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_MAXREDIRS</b></td>
* The maximum amount of HTTP redirections to follow. Use this option
* alongside <b>CURLOPT_FOLLOWLOCATION</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PORT</b></td>
* An alternative port number to connect to.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_POSTREDIR</b></td>
* A bitmask of 1 (301 Moved Permanently), 2 (302 Found)
* and 4 (303 See Other) if the HTTP POST method should be maintained
* when <b>CURLOPT_FOLLOWLOCATION</b> is set and a
* specific type of redirect occurs.
* </td>
* Added in cURL 7.19.1. Available since PHP 5.3.2.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PROTOCOLS</b></td>
* <p>
* Bitmask of <b>CURLPROTO_*</b> values. If used, this bitmask
* limits what protocols libcurl may use in the transfer. This allows you to have
* a libcurl built to support a wide range of protocols but still limit specific
* transfers to only be allowed to use a subset of them. By default libcurl will
* accept all protocols it supports.
* See also <b>CURLOPT_REDIR_PROTOCOLS</b>.
* </p>
* <p>
* Valid protocol options are:
* <i>CURLPROTO_HTTP</i>,
* <i>CURLPROTO_HTTPS</i>,
* <i>CURLPROTO_FTP</i>,
* <i>CURLPROTO_FTPS</i>,
* <i>CURLPROTO_SCP</i>,
* <i>CURLPROTO_SFTP</i>,
* <i>CURLPROTO_TELNET</i>,
* <i>CURLPROTO_LDAP</i>,
* <i>CURLPROTO_LDAPS</i>,
* <i>CURLPROTO_DICT</i>,
* <i>CURLPROTO_FILE</i>,
* <i>CURLPROTO_TFTP</i>,
* <i>CURLPROTO_ALL</i>
* </p>
* </td>
* Added in cURL 7.19.4.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PROXYAUTH</b></td>
* The HTTP authentication method(s) to use for the proxy connection.
* Use the same bitmasks as described in
* <b>CURLOPT_HTTPAUTH</b>. For proxy authentication,
* only <i>CURLAUTH_BASIC</i> and
* <i>CURLAUTH_NTLM</i> are currently supported.
* </td>
* Added in cURL 7.10.7.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PROXYPORT</b></td>
* The port number of the proxy to connect to. This port number can
* also be set in <b>CURLOPT_PROXY</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PROXYTYPE</b></td>
* Either <b>CURLPROXY_HTTP</b> (default),
* <b>CURLPROXY_SOCKS4</b>,
* <b>CURLPROXY_SOCKS5</b>,
* <b>CURLPROXY_SOCKS4A</b> or
* <b>CURLPROXY_SOCKS5_HOSTNAME</b>.
* </td>
* Added in cURL 7.10.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_REDIR_PROTOCOLS</b></td>
* Bitmask of <b>CURLPROTO_*</b> values. If used, this bitmask
* limits what protocols libcurl may use in a transfer that it follows to in
* a redirect when <b>CURLOPT_FOLLOWLOCATION</b> is enabled.
* This allows you to limit specific transfers to only be allowed to use a subset
* of protocols in redirections. By default libcurl will allow all protocols
* except for FILE and SCP. This is a difference compared to pre-7.19.4 versions
* which unconditionally would follow to all protocols supported.
* See also <b>CURLOPT_PROTOCOLS</b> for protocol constant values.
* </td>
* Added in cURL 7.19.4.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_RESUME_FROM</b></td>
* The offset, in bytes, to resume a transfer from.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_SSL_VERIFYHOST</b></td>
* 1 to check the existence of a common name in the
* SSL peer certificate. 2 to check the existence of
* a common name and also verify that it matches the hostname
* provided. In production environments the value of this option
* should be kept at 2 (default value).
* </td>
* Support for value 1 removed in cURL 7.28.1
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_SSLVERSION</b></td>
* One of <b>CURL_SSLVERSION_DEFAULT</b> (0),
* <b>CURL_SSLVERSION_TLSv1</b> (1),
* <b>CURL_SSLVERSION_SSLv2</b> (2),
* <b>CURL_SSLVERSION_SSLv3</b> (3),
* <b>CURL_SSLVERSION_TLSv1_0</b> (4),
* <b>CURL_SSLVERSION_TLSv1_1</b> (5) or
* <b>CURL_SSLVERSION_TLSv1_2</b> (6).
* <p>
* Your best bet is to not set this and let it use the default.
* Setting it to 2 or 3 is very dangerous given the known
* vulnerabilities in SSLv2 and SSLv3.
* </p>
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TIMECONDITION</b></td>
* How <b>CURLOPT_TIMEVALUE</b> is treated.
* Use <i>CURL_TIMECOND_IFMODSINCE</i> to return the
* page only if it has been modified since the time specified in
* <b>CURLOPT_TIMEVALUE</b>. If it hasn't been modified,
* a "304 Not Modified" header will be returned
* assuming <b>CURLOPT_HEADER</b> is <b>TRUE</b>.
* Use <i>CURL_TIMECOND_IFUNMODSINCE</i> for the reverse
* effect. <i>CURL_TIMECOND_IFMODSINCE</i> is the
* default.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TIMEOUT</b></td>
* The maximum number of seconds to allow cURL functions to execute.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TIMEOUT_MS</b></td>
* The maximum number of milliseconds to allow cURL functions to
* execute.
* If libcurl is built to use the standard system name resolver, that
* portion of the connect will still use full-second resolution for
* timeouts with a minimum timeout allowed of one second.
* </td>
* Added in cURL 7.16.2. Available since PHP 5.2.3.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_TIMEVALUE</b></td>
* The time in seconds since January 1st, 1970. The time will be used
* by <b>CURLOPT_TIMECONDITION</b>. By default,
* <i>CURL_TIMECOND_IFMODSINCE</i> is used.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_MAX_RECV_SPEED_LARGE</b></td>
* If a download exceeds this speed (counted in bytes per second) on
* cumulative average during the transfer, the transfer will pause to
* keep the average rate less than or equal to the parameter value.
* Defaults to unlimited speed.
* </td>
* Added in cURL 7.15.5. Available since PHP 5.4.0.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_MAX_SEND_SPEED_LARGE</b></td>
* If an upload exceeds this speed (counted in bytes per second) on
* cumulative average during the transfer, the transfer will pause to
* keep the average rate less than or equal to the parameter value.
* Defaults to unlimited speed.
* </td>
* Added in cURL 7.15.5. Available since PHP 5.4.0.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_SSH_AUTH_TYPES</b></td>
* A bitmask consisting of one or more of
* <b>CURLSSH_AUTH_PUBLICKEY</b>,
* <b>CURLSSH_AUTH_PASSWORD</b>,
* <b>CURLSSH_AUTH_HOST</b>,
* <b>CURLSSH_AUTH_KEYBOARD</b>. Set to
* <b>CURLSSH_AUTH_ANY</b> to let libcurl pick one.
* </td>
* Added in cURL 7.16.1.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_IPRESOLVE</b></td>
* Allows an application to select what kind of IP addresses to use when
* resolving host names. This is only interesting when using host names that
* resolve addresses using more than one version of IP, possible values are
* <b>CURL_IPRESOLVE_WHATEVER</b>,
* <b>CURL_IPRESOLVE_V4</b>,
* <b>CURL_IPRESOLVE_V6</b>, by default
* <b>CURL_IPRESOLVE_WHATEVER</b>.
* </td>
* Added in cURL 7.10.8.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTP_FILEMETHOD</b></td>
* Tell curl which method to use to reach a file on a FTP(S) server. Possible values are
* <b>CURLFTPMETHOD_MULTICWD</b>,
* <b>CURLFTPMETHOD_NOCWD</b> and
* <b>CURLFTPMETHOD_SINGLECWD</b>.
* </td>
* Added in cURL 7.15.1. Available since PHP 5.3.0.
* </td>
* </tr>
* </p>
* <p>
* <i>value</i> should be a string for the
* following values of the <i>option</i> parameter:
* <tr valign="top">
* <td>Option</td>
* <td>Set <i>value</i> to</td>
* <td>Notes</td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CAINFO</b></td>
* The name of a file holding one or more certificates to verify the
* peer with. This only makes sense when used in combination with
* <b>CURLOPT_SSL_VERIFYPEER</b>.
* </td>
* Might require an absolute path.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CAPATH</b></td>
* A directory that holds multiple CA certificates. Use this option
* alongside <b>CURLOPT_SSL_VERIFYPEER</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_COOKIE</b></td>
* The contents of the "Cookie: " header to be
* used in the HTTP request.
* Note that multiple cookies are separated with a semicolon followed
* by a space (e.g., "fruit=apple; colour=red")
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_COOKIEFILE</b></td>
* The name of the file containing the cookie data. The cookie file can
* be in Netscape format, or just plain HTTP-style headers dumped into
* a file.
* If the name is an empty string, no cookies are loaded, but cookie
* handling is still enabled.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_COOKIEJAR</b></td>
* The name of a file to save all internal cookies to when the handle is closed,
* e.g. after a call to curl_close.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_CUSTOMREQUEST</b></td>
* <p>
* A custom request method to use instead of
* "GET" or "HEAD" when doing
* a HTTP request. This is useful for doing
* "DELETE" or other, more obscure HTTP requests.
* Valid values are things like "GET",
* "POST", "CONNECT" and so on;
* i.e. Do not enter a whole HTTP request line here. For instance,
* entering "GET /index.html HTTP/1.0\r\n\r\n"
* would be incorrect.
* <p>
* Don't do this without making sure the server supports the custom
* request method first.
* </p>
* </p></td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_EGDSOCKET</b></td>
* Like <b>CURLOPT_RANDOM_FILE</b>, except a filename
* to an Entropy Gathering Daemon socket.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_ENCODING</b></td>
* The contents of the "Accept-Encoding: " header.
* This enables decoding of the response. Supported encodings are
* "identity", "deflate", and
* "gzip". If an empty string, "",
* is set, a header containing all supported encoding types is sent.
* </td>
* Added in cURL 7.10.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_FTPPORT</b></td>
* The value which will be used to get the IP address to use
* for the FTP "PORT" instruction. The "PORT" instruction tells
* the remote server to connect to our specified IP address. The
* string may be a plain IP address, a hostname, a network
* interface name (under Unix), or just a plain '-' to use the
* systems default IP address.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_INTERFACE</b></td>
* The name of the outgoing network interface to use. This can be an
* interface name, an IP address or a host name.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_KEYPASSWD</b></td>
* The password required to use the <b>CURLOPT_SSLKEY</b>
* or <b>CURLOPT_SSH_PRIVATE_KEYFILE</b> private key.
* </td>
* Added in cURL 7.16.1.
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_KRB4LEVEL</b></td>
* The KRB4 (Kerberos 4) security level. Any of the following values
* (in order from least to most powerful) are valid:
* "clear",
* "safe",
* "confidential",
* "private"..
* If the string does not match one of these,
* "private" is used. Setting this option to <b>NULL</b>
* will disable KRB4 security. Currently KRB4 security only works
* with FTP transactions.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_POSTFIELDS</b></td>
* The full data to post in a HTTP "POST" operation.
* To post a file, prepend a filename with @ and
* use the full path. The filetype can be explicitly specified by
* following the filename with the type in the format
* ';type=mimetype'. This parameter can either be
* passed as a urlencoded string like 'para1=val1&#38;para2=val2&#38;...'
* or as an array with the field name as key and field data as value.
* If <i>value</i> is an array, the
* Content-Type header will be set to
* multipart/form-data.
* As of PHP 5.2.0, <i>value</i> must be an array if
* files are passed to this option with the @ prefix.
* As of PHP 5.5.0, the @ prefix is deprecated and
* files can be sent using <b>CURLFile</b>. The
* @ prefix can be disabled for safe passing of
* values beginning with @ by setting the
* <b>CURLOPT_SAFE_UPLOAD</b> option to <b>TRUE</b>.
* </td>
* </td>
* </tr>
* <tr valign="top">
* <b>CURLOPT_PRIVATE</b></td>
* Any data that should be associated with this cURL handle. This data