-
Notifications
You must be signed in to change notification settings - Fork 7
/
ftp.php
704 lines (657 loc) · 21.8 KB
/
ftp.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
<?php
// Start of ftp v.7.0.4-7ubuntu2
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Opens an FTP connection
* @link http://php.net/manual/en/function.ftp-connect.php
* @param string $host <p>
* The FTP server address. This parameter shouldn't have any trailing
* slashes and shouldn't be prefixed with ftp://.
* </p>
* @param int $port [optional] <p>
* This parameter specifies an alternate port to connect to. If it is
* omitted or set to zero, then the default FTP port, 21, will be used.
* </p>
* @param int $timeout [optional] <p>
* This parameter specifies the timeout for all subsequent network operations.
* If omitted, the default value is 90 seconds. The timeout can be changed and
* queried at any time with <b>ftp_set_option</b> and
* <b>ftp_get_option</b>.
* </p>
* @return resource a FTP stream on success or <b>FALSE</b> on error.
*/
function ftp_connect(string $host, int $port = 21, int $timeout = 90) {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Opens an Secure SSL-FTP connection
* @link http://php.net/manual/en/function.ftp-ssl-connect.php
* @param string $host <p>
* The FTP server address. This parameter shouldn't have any trailing
* slashes and shouldn't be prefixed with ftp://.
* </p>
* @param int $port [optional] <p>
* This parameter specifies an alternate port to connect to. If it is
* omitted or set to zero, then the default FTP port, 21, will be used.
* </p>
* @param int $timeout [optional] <p>
* This parameter specifies the timeout for all subsequent network operations.
* If omitted, the default value is 90 seconds. The timeout can be changed and
* queried at any time with <b>ftp_set_option</b> and
* <b>ftp_get_option</b>.
* </p>
* @return resource a SSL-FTP stream on success or <b>FALSE</b> on error.
*/
function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Logs in to an FTP connection
* @link http://php.net/manual/en/function.ftp-login.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $username <p>
* The username (USER).
* </p>
* @param string $password <p>
* The password (PASS).
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* If login fails, PHP will also throw a warning.
*/
function ftp_login($ftp_stream, string $username, string $password): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns the current directory name
* @link http://php.net/manual/en/function.ftp-pwd.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @return string the current directory name or <b>FALSE</b> on error.
*/
function ftp_pwd($ftp_stream): string {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Changes to the parent directory
* @link http://php.net/manual/en/function.ftp-cdup.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_cdup($ftp_stream): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Changes the current directory on a FTP server
* @link http://php.net/manual/en/function.ftp-chdir.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The target directory.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
* If changing directory fails, PHP will also throw a warning.
*/
function ftp_chdir($ftp_stream, string $directory): bool {}
/**
* (PHP 4 >= 4.0.3, PHP 5, PHP 7)<br/>
* Requests execution of a command on the FTP server
* @link http://php.net/manual/en/function.ftp-exec.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
* The command to execute.
* </p>
* @return bool <b>TRUE</b> if the command was successful (server sent response code:
* 200); otherwise returns <b>FALSE</b>.
*/
function ftp_exec($ftp_stream, string $command): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Sends an arbitrary command to an FTP server
* @link http://php.net/manual/en/function.ftp-raw.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
* The command to execute.
* </p>
* @return array the server's response as an array of strings.
* No parsing is performed on the response string, nor does
* <b>ftp_raw</b> determine if the command succeeded.
*/
function ftp_raw($ftp_stream, string $command): array {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Creates a directory
* @link http://php.net/manual/en/function.ftp-mkdir.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The name of the directory that will be created.
* </p>
* @return string the newly created directory name on success or <b>FALSE</b> on error.
*/
function ftp_mkdir($ftp_stream, string $directory): string {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Removes a directory
* @link http://php.net/manual/en/function.ftp-rmdir.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory to delete. This must be either an absolute or relative
* path to an empty directory.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_rmdir($ftp_stream, string $directory): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Set permissions on a file via FTP
* @link http://php.net/manual/en/function.ftp-chmod.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param int $mode <p>
* The new permissions, given as an octal value.
* </p>
* @param string $filename <p>
* The remote file.
* </p>
* @return int the new file permissions on success or <b>FALSE</b> on error.
*/
function ftp_chmod($ftp_stream, int $mode, string $filename): int {}
/**
* (PHP 5, PHP 7)<br/>
* Allocates space for a file to be uploaded
* @link http://php.net/manual/en/function.ftp-alloc.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param int $filesize <p>
* The number of bytes to allocate.
* </p>
* @param string $result [optional] <p>
* A textual representation of the servers response will be returned by
* reference in <i>result</i> if a variable is provided.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_alloc($ftp_stream, int $filesize, string &$result = null): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns a list of files in the given directory
* @link http://php.net/manual/en/function.ftp-nlist.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory to be listed. This parameter can also include arguments, eg.
* ftp_nlist($conn_id, "-la /your/dir");
* Note that this parameter isn't escaped so there may be some issues with
* filenames containing spaces and other characters.
* </p>
* @return array an array of filenames from the specified directory on success or
* <b>FALSE</b> on error.
*/
function ftp_nlist($ftp_stream, string $directory): array {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns a detailed list of files in the given directory
* @link http://php.net/manual/en/function.ftp-rawlist.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $directory <p>
* The directory path. May include arguments for the LIST
* command.
* </p>
* @param bool $recursive [optional] <p>
* If set to <b>TRUE</b>, the issued command will be LIST -R.
* </p>
* @return mixed an array where each element corresponds to one line of text. Returns
* <b>FALSE</b> when passed <i>directory</i> is invalid.
* </p>
* <p>
* The output is not parsed in any way. The system type identifier returned by
* <b>ftp_systype</b> can be used to determine how the results
* should be interpreted.
*/
function ftp_rawlist($ftp_stream, string $directory, bool $recursive = false) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns the system type identifier of the remote FTP server
* @link http://php.net/manual/en/function.ftp-systype.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @return string the remote system type, or <b>FALSE</b> on error.
*/
function ftp_systype($ftp_stream): string {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Turns passive mode on or off
* @link http://php.net/manual/en/function.ftp-pasv.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param bool $pasv <p>
* If <b>TRUE</b>, the passive mode is turned on, else it's turned off.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_pasv($ftp_stream, bool $pasv): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Downloads a file from the FTP server
* @link http://php.net/manual/en/function.ftp-get.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $local_file <p>
* The local file path (will be overwritten if the file already exists).
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $resumepos [optional] <p>
* The position in the remote file to start downloading from.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode, int $resumepos = 0): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Downloads a file from the FTP server and saves to an open file
* @link http://php.net/manual/en/function.ftp-fget.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param resource $handle <p>
* An open file pointer in which we store the data.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $resumepos [optional] <p>
* The position in the remote file to start downloading from.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode, int $resumepos = 0): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Uploads a file to the FTP server
* @link http://php.net/manual/en/function.ftp-put.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param string $local_file <p>
* The local file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $startpos [optional] <p>The position in the remote file to start uploading to.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode, int $startpos = 0): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Uploads from an open file to the FTP server
* @link http://php.net/manual/en/function.ftp-fput.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param resource $handle <p>
* An open file pointer on the local file. Reading stops at end of file.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $startpos [optional] <p>The position in the remote file to start uploading to.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode, int $startpos = 0): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns the size of the given file
* @link http://php.net/manual/en/function.ftp-size.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The remote file.
* </p>
* @return int the file size on success, or -1 on error.
*/
function ftp_size($ftp_stream, string $remote_file): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Returns the last modified time of the given file
* @link http://php.net/manual/en/function.ftp-mdtm.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The file from which to extract the last modification time.
* </p>
* @return int the last modified time as a Unix timestamp on success, or -1 on
* error.
*/
function ftp_mdtm($ftp_stream, string $remote_file): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Renames a file or a directory on the FTP server
* @link http://php.net/manual/en/function.ftp-rename.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $oldname <p>
* The old file/directory name.
* </p>
* @param string $newname <p>
* The new name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_rename($ftp_stream, string $oldname, string $newname): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Deletes a file on the FTP server
* @link http://php.net/manual/en/function.ftp-delete.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $path <p>
* The file to delete.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_delete($ftp_stream, string $path): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Sends a SITE command to the server
* @link http://php.net/manual/en/function.ftp-site.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $command <p>
* The SITE command. Note that this parameter isn't escaped so there may
* be some issues with filenames containing spaces and other characters.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_site($ftp_stream, string $command): bool {}
/**
* (PHP 4 >= 4.2.0, PHP 5, PHP 7)<br/>
* Closes an FTP connection
* @link http://php.net/manual/en/function.ftp-close.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_close($ftp_stream): bool {}
/**
* (PHP 4 >= 4.2.0, PHP 5, PHP 7)<br/>
* Set miscellaneous runtime FTP options
* @link http://php.net/manual/en/function.ftp-set-option.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param int $option <p>
* Currently, the following options are supported:
* <table>
* Supported runtime FTP options
* <tr valign="top">
* <td><b>FTP_TIMEOUT_SEC</b></td>
* <td>
* Changes the timeout in seconds used for all network related
* functions. <i>value</i> must be an integer that
* is greater than 0. The default timeout is 90 seconds.
* </td>
* </tr>
* <tr valign="top">
* <td><b>FTP_AUTOSEEK</b></td>
* <td>
* When enabled, GET or PUT requests with a
* <i>resumepos</i> or <i>startpos</i>
* parameter will first seek to the requested position within the file.
* This is enabled by default.
* </td>
* </tr>
* </table>
* </p>
* @param mixed $value <p>
* This parameter depends on which <i>option</i> is chosen
* to be altered.
* </p>
* @return bool <b>TRUE</b> if the option could be set; <b>FALSE</b> if not. A warning
* message will be thrown if the <i>option</i> is not
* supported or the passed <i>value</i> doesn't match the
* expected value for the given <i>option</i>.
*/
function ftp_set_option($ftp_stream, int $option, $value): bool {}
/**
* (PHP 4 >= 4.2.0, PHP 5, PHP 7)<br/>
* Retrieves various runtime behaviours of the current FTP stream
* @link http://php.net/manual/en/function.ftp-get-option.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param int $option <p>
* Currently, the following options are supported:
* <table>
* Supported runtime FTP options
* <tr valign="top">
* <td><b>FTP_TIMEOUT_SEC</b></td>
* <td>
* Returns the current timeout used for network related operations.
* </td>
* </tr>
* <tr valign="top">
* <td><b>FTP_AUTOSEEK</b></td>
* <td>
* Returns <b>TRUE</b> if this option is on, <b>FALSE</b> otherwise.
* </td>
* </tr>
* </table>
* </p>
* @return mixed the value on success or <b>FALSE</b> if the given
* <i>option</i> is not supported. In the latter case, a
* warning message is also thrown.
*/
function ftp_get_option($ftp_stream, int $option) {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Retrieves a file from the FTP server and writes it to an open file (non-blocking)
* @link http://php.net/manual/en/function.ftp-nb-fget.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param resource $handle <p>
* An open file pointer in which we store the data.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $resumepos [optional] <p>The position in the remote file to start downloading from.</p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
function ftp_nb_fget($ftp_stream, $handle, string $remote_file, int $mode, int $resumepos = 0): int {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Retrieves a file from the FTP server and writes it to a local file (non-blocking)
* @link http://php.net/manual/en/function.ftp-nb-get.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $local_file <p>
* The local file path (will be overwritten if the file already exists).
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $resumepos [optional] <p>The position in the remote file to start downloading from.</p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
function ftp_nb_get($ftp_stream, string $local_file, string $remote_file, int $mode, int $resumepos = 0): int {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Continues retrieving/sending a file (non-blocking)
* @link http://php.net/manual/en/function.ftp-nb-continue.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
function ftp_nb_continue($ftp_stream): int {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Stores a file on the FTP server (non-blocking)
* @link http://php.net/manual/en/function.ftp-nb-put.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param string $local_file <p>
* The local file path.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $startpos [optional] <p>The position in the remote file to start uploading to.</p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
function ftp_nb_put($ftp_stream, string $remote_file, string $local_file, int $mode, int $startpos = 0): int {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Stores a file from an open file to the FTP server (non-blocking)
* @link http://php.net/manual/en/function.ftp-nb-fput.php
* @param resource $ftp_stream <p>
* The link identifier of the FTP connection.
* </p>
* @param string $remote_file <p>
* The remote file path.
* </p>
* @param resource $handle <p>
* An open file pointer on the local file. Reading stops at end of file.
* </p>
* @param int $mode <p>
* The transfer mode. Must be either <b>FTP_ASCII</b> or
* <b>FTP_BINARY</b>.
* </p>
* @param int $startpos [optional] <p>The position in the remote file to start uploading to.</p>
* @return int <b>FTP_FAILED</b> or <b>FTP_FINISHED</b>
* or <b>FTP_MOREDATA</b>.
*/
function ftp_nb_fput($ftp_stream, string $remote_file, $handle, int $mode, int $startpos = 0): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Alias of <b>ftp_close</b>
* @link http://php.net/manual/en/function.ftp-quit.php
* @param $ftp
*/
function ftp_quit($ftp) {}
/**
* <p></p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_ASCII', 1);
/**
* <p></p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_TEXT', 1);
/**
* <p></p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_BINARY', 2);
/**
* <p></p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_IMAGE', 2);
/**
* <p>
* Automatically determine resume position and start position for GET and PUT requests
* (only works if FTP_AUTOSEEK is enabled)
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_AUTORESUME', -1);
/**
* <p>
* See <b>ftp_set_option</b> for information.
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_TIMEOUT_SEC', 0);
/**
* <p>
* See <b>ftp_set_option</b> for information.
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_AUTOSEEK', 1);
define ('FTP_USEPASVADDRESS', 2);
/**
* <p>
* Asynchronous transfer has failed
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_FAILED', 0);
/**
* <p>
* Asynchronous transfer has finished
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_FINISHED', 1);
/**
* <p>
* Asynchronous transfer is still active
* </p>
* @link http://php.net/manual/en/ftp.constants.php
*/
define ('FTP_MOREDATA', 2);
// End of ftp v.7.0.4-7ubuntu2
?>