| 1 |
<?php |
| 2 |
|
| 3 |
// Start of ftp v. |
| 4 |
|
| 5 |
/** |
| 6 |
* Opens an FTP connection |
| 7 |
* @link http://www.php.net/manual/en/function.ftp-connect.php |
| 8 |
* @param host string <p> |
| 9 |
* The FTP server address. This parameter shouldn't have any trailing |
| 10 |
* slashes and shouldn't be prefixed with ftp://. |
| 11 |
* </p> |
| 12 |
* @param port int[optional] <p> |
| 13 |
* This parameter specifies an alternate port to connect to. If it is |
| 14 |
* omitted or set to zero, then the default FTP port, 21, will be used. |
| 15 |
* </p> |
| 16 |
* @param timeout int[optional] <p> |
| 17 |
* This parameter specifies the timeout for all subsequent network operations. |
| 18 |
* If omitted, the default value is 90 seconds. The timeout can be changed and |
| 19 |
* queried at any time with ftp_set_option and |
| 20 |
* ftp_get_option. |
| 21 |
* </p> |
| 22 |
* @return resource a FTP stream on success or false on error. |
| 23 |
*/ |
| 24 |
function ftp_connect ($host, $port = null, $timeout = null) {} |
| 25 |
|
| 26 |
/** |
| 27 |
* Opens an Secure SSL-FTP connection |
| 28 |
* @link http://www.php.net/manual/en/function.ftp-ssl-connect.php |
| 29 |
* @param host string <p> |
| 30 |
* The FTP server address. This parameter shouldn't have any trailing |
| 31 |
* slashes and shouldn't be prefixed with ftp://. |
| 32 |
* </p> |
| 33 |
* @param port int[optional] <p> |
| 34 |
* This parameter specifies an alternate port to connect to. If it is |
| 35 |
* omitted or set to zero, then the default FTP port, 21, will be used. |
| 36 |
* </p> |
| 37 |
* @param timeout int[optional] <p> |
| 38 |
* This parameter specifies the timeout for all subsequent network operations. |
| 39 |
* If omitted, the default value is 90 seconds. The timeout can be changed and |
| 40 |
* queried at any time with ftp_set_option and |
| 41 |
* ftp_get_option. |
| 42 |
* </p> |
| 43 |
* @return resource a SSL-FTP stream on success or false on error. |
| 44 |
*/ |
| 45 |
function ftp_ssl_connect ($host, $port = null, $timeout = null) {} |
| 46 |
|
| 47 |
/** |
| 48 |
* Logs in to an FTP connection |
| 49 |
* @link http://www.php.net/manual/en/function.ftp-login.php |
| 50 |
* @param ftp_stream resource <p> |
| 51 |
* The link identifier of the FTP connection. |
| 52 |
* </p> |
| 53 |
* @param username string <p> |
| 54 |
* The username (USER). |
| 55 |
* </p> |
| 56 |
* @param password string <p> |
| 57 |
* The password (PASS). |
| 58 |
* </p> |
| 59 |
* @return bool Returns true on success, false on failure. |
| 60 |
* If login fails, PHP will also throw a warning. |
| 61 |
*/ |
| 62 |
function ftp_login ($ftp_stream, $username, $password) {} |
| 63 |
|
| 64 |
/** |
| 65 |
* Returns the current directory name |
| 66 |
* @link http://www.php.net/manual/en/function.ftp-pwd.php |
| 67 |
* @param ftp_stream resource <p> |
| 68 |
* The link identifier of the FTP connection. |
| 69 |
* </p> |
| 70 |
* @return string the current directory name or false on error. |
| 71 |
*/ |
| 72 |
function ftp_pwd ($ftp_stream) {} |
| 73 |
|
| 74 |
/** |
| 75 |
* Changes to the parent directory |
| 76 |
* @link http://www.php.net/manual/en/function.ftp-cdup.php |
| 77 |
* @param ftp_stream resource <p> |
| 78 |
* The link identifier of the FTP connection. |
| 79 |
* </p> |
| 80 |
* @return bool Returns true on success, false on failure. |
| 81 |
*/ |
| 82 |
function ftp_cdup ($ftp_stream) {} |
| 83 |
|
| 84 |
/** |
| 85 |
* Changes the current directory on a FTP server |
| 86 |
* @link http://www.php.net/manual/en/function.ftp-chdir.php |
| 87 |
* @param ftp_stream resource <p> |
| 88 |
* The link identifier of the FTP connection. |
| 89 |
* </p> |
| 90 |
* @param directory string <p> |
| 91 |
* The target directory. |
| 92 |
* </p> |
| 93 |
* @return bool Returns true on success, false on failure. |
| 94 |
* If changing directory fails, PHP will also throw a warning. |
| 95 |
*/ |
| 96 |
function ftp_chdir ($ftp_stream, $directory) {} |
| 97 |
|
| 98 |
/** |
| 99 |
* Requests execution of a command on the FTP server |
| 100 |
* @link http://www.php.net/manual/en/function.ftp-exec.php |
| 101 |
* @param ftp_stream resource <p> |
| 102 |
* The link identifier of the FTP connection. |
| 103 |
* </p> |
| 104 |
* @param command string <p> |
| 105 |
* The command to execute. |
| 106 |
* </p> |
| 107 |
* @return bool true if the command was successful (server sent response code: |
| 108 |
* 200); otherwise returns false. |
| 109 |
*/ |
| 110 |
function ftp_exec ($ftp_stream, $command) {} |
| 111 |
|
| 112 |
/** |
| 113 |
* Sends an arbitrary command to an FTP server |
| 114 |
* @link http://www.php.net/manual/en/function.ftp-raw.php |
| 115 |
* @param ftp_stream resource <p> |
| 116 |
* The link identifier of the FTP connection. |
| 117 |
* </p> |
| 118 |
* @param command string <p> |
| 119 |
* The command to execute. |
| 120 |
* </p> |
| 121 |
* @return array the server's response as an array of strings. |
| 122 |
* No parsing is performed on the response string, nor does |
| 123 |
* ftp_raw determine if the command succeeded. |
| 124 |
*/ |
| 125 |
function ftp_raw ($ftp_stream, $command) {} |
| 126 |
|
| 127 |
/** |
| 128 |
* Creates a directory |
| 129 |
* @link http://www.php.net/manual/en/function.ftp-mkdir.php |
| 130 |
* @param ftp_stream resource <p> |
| 131 |
* The link identifier of the FTP connection. |
| 132 |
* </p> |
| 133 |
* @param directory string <p> |
| 134 |
* The name of the directory that will be created. |
| 135 |
* </p> |
| 136 |
* @return string the newly created directory name on success or false on error. |
| 137 |
*/ |
| 138 |
function ftp_mkdir ($ftp_stream, $directory) {} |
| 139 |
|
| 140 |
/** |
| 141 |
* Removes a directory |
| 142 |
* @link http://www.php.net/manual/en/function.ftp-rmdir.php |
| 143 |
* @param ftp_stream resource <p> |
| 144 |
* The link identifier of the FTP connection. |
| 145 |
* </p> |
| 146 |
* @param directory string <p> |
| 147 |
* The directory to delete. This must be either an absolute or relative |
| 148 |
* path to an empty directory. |
| 149 |
* </p> |
| 150 |
* @return bool Returns true on success, false on failure. |
| 151 |
*/ |
| 152 |
function ftp_rmdir ($ftp_stream, $directory) {} |
| 153 |
|
| 154 |
/** |
| 155 |
* Set permissions on a file via FTP |
| 156 |
* @link http://www.php.net/manual/en/function.ftp-chmod.php |
| 157 |
* @param ftp_stream resource <p> |
| 158 |
* The link identifier of the FTP connection. |
| 159 |
* </p> |
| 160 |
* @param mode int <p> |
| 161 |
* The new permissions, given as an octal value. |
| 162 |
* </p> |
| 163 |
* @param filename string <p> |
| 164 |
* The remote file. |
| 165 |
* </p> |
| 166 |
* @return int the new file permissions on success or false on error. |
| 167 |
*/ |
| 168 |
function ftp_chmod ($ftp_stream, $mode, $filename) {} |
| 169 |
|
| 170 |
/** |
| 171 |
* Allocates space for a file to be uploaded |
| 172 |
* @link http://www.php.net/manual/en/function.ftp-alloc.php |
| 173 |
* @param ftp_stream resource <p> |
| 174 |
* The link identifier of the FTP connection. |
| 175 |
* </p> |
| 176 |
* @param filesize int <p> |
| 177 |
* The number of bytes to allocate. |
| 178 |
* </p> |
| 179 |
* @param result string[optional] <p> |
| 180 |
* A textual representation of the servers response will be returned by |
| 181 |
* reference in result if a variable is provided. |
| 182 |
* </p> |
| 183 |
* @return bool Returns true on success, false on failure. |
| 184 |
*/ |
| 185 |
function ftp_alloc ($ftp_stream, $filesize, &$result = null) {} |
| 186 |
|
| 187 |
/** |
| 188 |
* Returns a list of files in the given directory |
| 189 |
* @link http://www.php.net/manual/en/function.ftp-nlist.php |
| 190 |
* @param ftp_stream resource <p> |
| 191 |
* The link identifier of the FTP connection. |
| 192 |
* </p> |
| 193 |
* @param directory string <p> |
| 194 |
* The directory to be listed. This parameter can also include arguments, eg. |
| 195 |
* ftp_nlist($conn_id, "-la /your/dir"); |
| 196 |
* Note that this parameter isn't escaped so there may be some issues with |
| 197 |
* filenames containing spaces and other characters. |
| 198 |
* </p> |
| 199 |
* @return array an array of filenames from the specified directory on success or |
| 200 |
* false on error. |
| 201 |
*/ |
| 202 |
function ftp_nlist ($ftp_stream, $directory) {} |
| 203 |
|
| 204 |
/** |
| 205 |
* Returns a detailed list of files in the given directory |
| 206 |
* @link http://www.php.net/manual/en/function.ftp-rawlist.php |
| 207 |
* @param ftp_stream resource <p> |
| 208 |
* The link identifier of the FTP connection. |
| 209 |
* </p> |
| 210 |
* @param directory string <p> |
| 211 |
* The directory path. May include arguments for the LIST |
| 212 |
* command. |
| 213 |
* </p> |
| 214 |
* @param recursive bool[optional] <p> |
| 215 |
* If set to true, the issued command will be LIST -R. |
| 216 |
* </p> |
| 217 |
* @return mixed an array where each element corresponds to one line of text. Returns |
| 218 |
* false when passed directory is invalid. |
| 219 |
* </p> |
| 220 |
* <p> |
| 221 |
* The output is not parsed in any way. The system type identifier returned by |
| 222 |
* ftp_systype can be used to determine how the results |
| 223 |
* should be interpreted. |
| 224 |
*/ |
| 225 |
function ftp_rawlist ($ftp_stream, $directory, $recursive = null) {} |
| 226 |
|
| 227 |
/** |
| 228 |
* Returns the system type identifier of the remote FTP server |
| 229 |
* @link http://www.php.net/manual/en/function.ftp-systype.php |
| 230 |
* @param ftp_stream resource <p> |
| 231 |
* The link identifier of the FTP connection. |
| 232 |
* </p> |
| 233 |
* @return string the remote system type, or false on error. |
| 234 |
*/ |
| 235 |
function ftp_systype ($ftp_stream) {} |
| 236 |
|
| 237 |
/** |
| 238 |
* Turns passive mode on or off |
| 239 |
* @link http://www.php.net/manual/en/function.ftp-pasv.php |
| 240 |
* @param ftp_stream resource <p> |
| 241 |
* The link identifier of the FTP connection. |
| 242 |
* </p> |
| 243 |
* @param pasv bool <p> |
| 244 |
* If true, the passive mode is turned on, else it's turned off. |
| 245 |
* </p> |
| 246 |
* @return bool Returns true on success, false on failure. |
| 247 |
*/ |
| 248 |
function ftp_pasv ($ftp_stream, $pasv) {} |
| 249 |
|
| 250 |
/** |
| 251 |
* Downloads a file from the FTP server |
| 252 |
* @link http://www.php.net/manual/en/function.ftp-get.php |
| 253 |
* @param ftp_stream resource <p> |
| 254 |
* The link identifier of the FTP connection. |
| 255 |
* </p> |
| 256 |
* @param local_file string <p> |
| 257 |
* The local file path (will be overwritten if the file already exists). |
| 258 |
* </p> |
| 259 |
* @param remote_file string <p> |
| 260 |
* The remote file path. |
| 261 |
* </p> |
| 262 |
* @param mode int <p> |
| 263 |
* The transfer mode. Must be either FTP_ASCII or |
| 264 |
* FTP_BINARY. |
| 265 |
* </p> |
| 266 |
* @param resumepos int[optional] <p> |
| 267 |
* The position in the remote file to start downloading from. |
| 268 |
* </p> |
| 269 |
* @return bool Returns true on success, false on failure. |
| 270 |
*/ |
| 271 |
function ftp_get ($ftp_stream, $local_file, $remote_file, $mode, $resumepos = null) {} |
| 272 |
|
| 273 |
/** |
| 274 |
* Downloads a file from the FTP server and saves to an open file |
| 275 |
* @link http://www.php.net/manual/en/function.ftp-fget.php |
| 276 |
* @param ftp_stream resource <p> |
| 277 |
* The link identifier of the FTP connection. |
| 278 |
* </p> |
| 279 |
* @param handle resource <p> |
| 280 |
* An open file pointer in which we store the data. |
| 281 |
* </p> |
| 282 |
* @param remote_file string <p> |
| 283 |
* The remote file path. |
| 284 |
* </p> |
| 285 |
* @param mode int <p> |
| 286 |
* The transfer mode. Must be either FTP_ASCII or |
| 287 |
* FTP_BINARY. |
| 288 |
* </p> |
| 289 |
* @param resumepos int[optional] <p> |
| 290 |
* The position in the remote file to start downloading from. |
| 291 |
* </p> |
| 292 |
* @return bool Returns true on success, false on failure. |
| 293 |
*/ |
| 294 |
function ftp_fget ($ftp_stream, $handle, $remote_file, $mode, $resumepos = null) {} |
| 295 |
|
| 296 |
/** |
| 297 |
* Uploads a file to the FTP server |
| 298 |
* @link http://www.php.net/manual/en/function.ftp-put.php |
| 299 |
* @param ftp_stream resource <p> |
| 300 |
* The link identifier of the FTP connection. |
| 301 |
* </p> |
| 302 |
* @param remote_file string <p> |
| 303 |
* The remote file path. |
| 304 |
* </p> |
| 305 |
* @param local_file string <p> |
| 306 |
* The local file path. |
| 307 |
* </p> |
| 308 |
* @param mode int <p> |
| 309 |
* The transfer mode. Must be either FTP_ASCII or |
| 310 |
* FTP_BINARY. |
| 311 |
* </p> |
| 312 |
* @param startpos int[optional] <p>The position in the remote file to start uploading to.</p> |
| 313 |
* @return bool Returns true on success, false on failure. |
| 314 |
*/ |
| 315 |
function ftp_put ($ftp_stream, $remote_file, $local_file, $mode, $startpos = null) {} |
| 316 |
|
| 317 |
/** |
| 318 |
* Uploads from an open file to the FTP server |
| 319 |
* @link http://www.php.net/manual/en/function.ftp-fput.php |
| 320 |
* @param ftp_stream resource <p> |
| 321 |
* The link identifier of the FTP connection. |
| 322 |
* </p> |
| 323 |
* @param remote_file string <p> |
| 324 |
* The remote file path. |
| 325 |
* </p> |
| 326 |
* @param handle resource <p> |
| 327 |
* An open file pointer on the local file. Reading stops at end of file. |
| 328 |
* </p> |
| 329 |
* @param mode int <p> |
| 330 |
* The transfer mode. Must be either FTP_ASCII or |
| 331 |
* FTP_BINARY. |
| 332 |
* </p> |
| 333 |
* @param startpos int[optional] <p>The position in the remote file to start uploading to.</p> |
| 334 |
* @return bool Returns true on success, false on failure. |
| 335 |
*/ |
| 336 |
function ftp_fput ($ftp_stream, $remote_file, $handle, $mode, $startpos = null) {} |
| 337 |
|
| 338 |
/** |
| 339 |
* Returns the size of the given file |
| 340 |
* @link http://www.php.net/manual/en/function.ftp-size.php |
| 341 |
* @param ftp_stream resource <p> |
| 342 |
* The link identifier of the FTP connection. |
| 343 |
* </p> |
| 344 |
* @param remote_file string <p> |
| 345 |
* The remote file. |
| 346 |
* </p> |
| 347 |
* @return int the file size on success, or -1 on error. |
| 348 |
*/ |
| 349 |
function ftp_size ($ftp_stream, $remote_file) {} |
| 350 |
|
| 351 |
/** |
| 352 |
* Returns the last modified time of the given file |
| 353 |
* @link http://www.php.net/manual/en/function.ftp-mdtm.php |
| 354 |
* @param ftp_stream resource <p> |
| 355 |
* The link identifier of the FTP connection. |
| 356 |
* </p> |
| 357 |
* @param remote_file string <p> |
| 358 |
* The file from which to extract the last modification time. |
| 359 |
* </p> |
| 360 |
* @return int the last modified time as a Unix timestamp on success, or -1 on |
| 361 |
* error. |
| 362 |
*/ |
| 363 |
function ftp_mdtm ($ftp_stream, $remote_file) {} |
| 364 |
|
| 365 |
/** |
| 366 |
* Renames a file or a directory on the FTP server |
| 367 |
* @link http://www.php.net/manual/en/function.ftp-rename.php |
| 368 |
* @param ftp_stream resource <p> |
| 369 |
* The link identifier of the FTP connection. |
| 370 |
* </p> |
| 371 |
* @param oldname string <p> |
| 372 |
* The old file/directory name. |
| 373 |
* </p> |
| 374 |
* @param newname string <p> |
| 375 |
* The new name. |
| 376 |
* </p> |
| 377 |
* @return bool Returns true on success, false on failure. |
| 378 |
*/ |
| 379 |
function ftp_rename ($ftp_stream, $oldname, $newname) {} |
| 380 |
|
| 381 |
/** |
| 382 |
* Deletes a file on the FTP server |
| 383 |
* @link http://www.php.net/manual/en/function.ftp-delete.php |
| 384 |
* @param ftp_stream resource <p> |
| 385 |
* The link identifier of the FTP connection. |
| 386 |
* </p> |
| 387 |
* @param path string <p> |
| 388 |
* The file to delete. |
| 389 |
* </p> |
| 390 |
* @return bool Returns true on success, false on failure. |
| 391 |
*/ |
| 392 |
function ftp_delete ($ftp_stream, $path) {} |
| 393 |
|
| 394 |
/** |
| 395 |
* Sends a SITE command to the server |
| 396 |
* @link http://www.php.net/manual/en/function.ftp-site.php |
| 397 |
* @param ftp_stream resource <p> |
| 398 |
* The link identifier of the FTP connection. |
| 399 |
* </p> |
| 400 |
* @param command string <p> |
| 401 |
* The SITE command. Note that this parameter isn't escaped so there may |
| 402 |
* be some issues with filenames containing spaces and other characters. |
| 403 |
* </p> |
| 404 |
* @return bool Returns true on success, false on failure. |
| 405 |
*/ |
| 406 |
function ftp_site ($ftp_stream, $command) {} |
| 407 |
|
| 408 |
/** |
| 409 |
* Closes an FTP connection |
| 410 |
* @link http://www.php.net/manual/en/function.ftp-close.php |
| 411 |
* @param ftp_stream resource <p> |
| 412 |
* The link identifier of the FTP connection. |
| 413 |
* </p> |
| 414 |
* @return bool Returns true on success, false on failure. |
| 415 |
*/ |
| 416 |
function ftp_close ($ftp_stream) {} |
| 417 |
|
| 418 |
/** |
| 419 |
* Set miscellaneous runtime FTP options |
| 420 |
* @link http://www.php.net/manual/en/function.ftp-set-option.php |
| 421 |
* @param ftp_stream resource <p> |
| 422 |
* The link identifier of the FTP connection. |
| 423 |
* </p> |
| 424 |
* @param option int <p> |
| 425 |
* Currently, the following options are supported: |
| 426 |
* <table> |
| 427 |
* Supported runtime FTP options |
| 428 |
* |
| 429 |
* |
| 430 |
* <tr valign="top"> |
| 431 |
* <td>FTP_TIMEOUT_SEC</td> |
| 432 |
* <td> |
| 433 |
* Changes the timeout in seconds used for all network related |
| 434 |
* functions. value must be an integer that |
| 435 |
* is greater than 0. The default timeout is 90 seconds. |
| 436 |
* </td> |
| 437 |
* </tr> |
| 438 |
* <tr valign="top"> |
| 439 |
* <td>FTP_AUTOSEEK</td> |
| 440 |
* <td> |
| 441 |
* When enabled, GET or PUT requests with a |
| 442 |
* resumepos or startpos |
| 443 |
* parameter will first seek to the requested position within the file. |
| 444 |
* This is enabled by default. |
| 445 |
* </td> |
| 446 |
* </tr> |
| 447 |
* |
| 448 |
* |
| 449 |
* </table> |
| 450 |
* </p> |
| 451 |
* @param value mixed <p> |
| 452 |
* This parameter depends on which option is chosen |
| 453 |
* to be altered. |
| 454 |
* </p> |
| 455 |
* @return bool true if the option could be set; false if not. A warning |
| 456 |
* message will be thrown if the option is not |
| 457 |
* supported or the passed value doesn't match the |
| 458 |
* expected value for the given option. |
| 459 |
*/ |
| 460 |
function ftp_set_option ($ftp_stream, $option, $value) {} |
| 461 |
|
| 462 |
/** |
| 463 |
* Retrieves various runtime behaviours of the current FTP stream |
| 464 |
* @link http://www.php.net/manual/en/function.ftp-get-option.php |
| 465 |
* @param ftp_stream resource <p> |
| 466 |
* The link identifier of the FTP connection. |
| 467 |
* </p> |
| 468 |
* @param option int <p> |
| 469 |
* Currently, the following options are supported: |
| 470 |
* <table> |
| 471 |
* Supported runtime FTP options |
| 472 |
* |
| 473 |
* |
| 474 |
* <tr valign="top"> |
| 475 |
* <td>FTP_TIMEOUT_SEC</td> |
| 476 |
* <td> |
| 477 |
* Returns the current timeout used for network related operations. |
| 478 |
* </td> |
| 479 |
* </tr> |
| 480 |
* <tr valign="top"> |
| 481 |
* <td>FTP_AUTOSEEK</td> |
| 482 |
* <td> |
| 483 |
* Returns true if this option is on, false otherwise. |
| 484 |
* </td> |
| 485 |
* </tr> |
| 486 |
* |
| 487 |
* |
| 488 |
* </table> |
| 489 |
* </p> |
| 490 |
* @return mixed the value on success or false if the given |
| 491 |
* option is not supported. In the latter case, a |
| 492 |
* warning message is also thrown. |
| 493 |
*/ |
| 494 |
function ftp_get_option ($ftp_stream, $option) {} |
| 495 |
|
| 496 |
/** |
| 497 |
* Retrieves a file from the FTP server and writes it to an open file (non-blocking) |
| 498 |
* @link http://www.php.net/manual/en/function.ftp-nb-fget.php |
| 499 |
* @param ftp_stream resource <p> |
| 500 |
* The link identifier of the FTP connection. |
| 501 |
* </p> |
| 502 |
* @param handle resource <p> |
| 503 |
* An open file pointer in which we store the data. |
| 504 |
* </p> |
| 505 |
* @param remote_file string <p> |
| 506 |
* The remote file path. |
| 507 |
* </p> |
| 508 |
* @param mode int <p> |
| 509 |
* The transfer mode. Must be either FTP_ASCII or |
| 510 |
* FTP_BINARY. |
| 511 |
* </p> |
| 512 |
* @param resumepos int[optional] <p>The position in the remote file to start downloading from.</p> |
| 513 |
* @return int FTP_FAILED or FTP_FINISHED |
| 514 |
* or FTP_MOREDATA. |
| 515 |
*/ |
| 516 |
function ftp_nb_fget ($ftp_stream, $handle, $remote_file, $mode, $resumepos = null) {} |
| 517 |
|
| 518 |
/** |
| 519 |
* Retrieves a file from the FTP server and writes it to a local file (non-blocking) |
| 520 |
* @link http://www.php.net/manual/en/function.ftp-nb-get.php |
| 521 |
* @param ftp_stream resource <p> |
| 522 |
* The link identifier of the FTP connection. |
| 523 |
* </p> |
| 524 |
* @param local_file string <p> |
| 525 |
* The local file path (will be overwritten if the file already exists). |
| 526 |
* </p> |
| 527 |
* @param remote_file string <p> |
| 528 |
* The remote file path. |
| 529 |
* </p> |
| 530 |
* @param mode int <p> |
| 531 |
* The transfer mode. Must be either FTP_ASCII or |
| 532 |
* FTP_BINARY. |
| 533 |
* </p> |
| 534 |
* @param resumepos int[optional] <p>The position in the remote file to start downloading from.</p> |
| 535 |
* @return int FTP_FAILED or FTP_FINISHED |
| 536 |
* or FTP_MOREDATA. |
| 537 |
*/ |
| 538 |
function ftp_nb_get ($ftp_stream, $local_file, $remote_file, $mode, $resumepos = null) {} |
| 539 |
|
| 540 |
/** |
| 541 |
* Continues retrieving/sending a file (non-blocking) |
| 542 |
* @link http://www.php.net/manual/en/function.ftp-nb-continue.php |
| 543 |
* @param ftp_stream resource <p> |
| 544 |
* The link identifier of the FTP connection. |
| 545 |
* </p> |
| 546 |
* @return int FTP_FAILED or FTP_FINISHED |
| 547 |
* or FTP_MOREDATA. |
| 548 |
*/ |
| 549 |
function ftp_nb_continue ($ftp_stream) {} |
| 550 |
|
| 551 |
/** |
| 552 |
* Stores a file on the FTP server (non-blocking) |
| 553 |
* @link http://www.php.net/manual/en/function.ftp-nb-put.php |
| 554 |
* @param ftp_stream resource <p> |
| 555 |
* The link identifier of the FTP connection. |
| 556 |
* </p> |
| 557 |
* @param remote_file string <p> |
| 558 |
* The remote file path. |
| 559 |
* </p> |
| 560 |
* @param local_file string <p> |
| 561 |
* The local file path. |
| 562 |
* </p> |
| 563 |
* @param mode int <p> |
| 564 |
* The transfer mode. Must be either FTP_ASCII or |
| 565 |
* FTP_BINARY. |
| 566 |
* </p> |
| 567 |
* @param startpos int[optional] <p>The position in the remote file to start uploading to.</p> |
| 568 |
* @return int FTP_FAILED or FTP_FINISHED |
| 569 |
* or FTP_MOREDATA. |
| 570 |
*/ |
| 571 |
function ftp_nb_put ($ftp_stream, $remote_file, $local_file, $mode, $startpos = null) {} |
| 572 |
|
| 573 |
/** |
| 574 |
* Stores a file from an open file to the FTP server (non-blocking) |
| 575 |
* @link http://www.php.net/manual/en/function.ftp-nb-fput.php |
| 576 |
* @param ftp_stream resource <p> |
| 577 |
* The link identifier of the FTP connection. |
| 578 |
* </p> |
| 579 |
* @param remote_file string <p> |
| 580 |
* The remote file path. |
| 581 |
* </p> |
| 582 |
* @param handle resource <p> |
| 583 |
* An open file pointer on the local file. Reading stops at end of file. |
| 584 |
* </p> |
| 585 |
* @param mode int <p> |
| 586 |
* The transfer mode. Must be either FTP_ASCII or |
| 587 |
* FTP_BINARY. |
| 588 |
* </p> |
| 589 |
* @param startpos int[optional] <p>The position in the remote file to start uploading to.</p> |
| 590 |
* @return int FTP_FAILED or FTP_FINISHED |
| 591 |
* or FTP_MOREDATA. |
| 592 |
*/ |
| 593 |
function ftp_nb_fput ($ftp_stream, $remote_file, $handle, $mode, $startpos = null) {} |
| 594 |
|
| 595 |
/** |
| 596 |
* &Alias; <function>ftp_close</function> |
| 597 |
* @link http://www.php.net/manual/en/function.ftp-quit.php |
| 598 |
* @param ftp |
| 599 |
*/ |
| 600 |
function ftp_quit ($ftp) {} |
| 601 |
|
| 602 |
|
| 603 |
/** |
| 604 |
* <p></p> |
| 605 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 606 |
*/ |
| 607 |
define ('FTP_ASCII', 1); |
| 608 |
|
| 609 |
/** |
| 610 |
* <p></p> |
| 611 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 612 |
*/ |
| 613 |
define ('FTP_TEXT', 1); |
| 614 |
|
| 615 |
/** |
| 616 |
* <p></p> |
| 617 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 618 |
*/ |
| 619 |
define ('FTP_BINARY', 2); |
| 620 |
|
| 621 |
/** |
| 622 |
* <p></p> |
| 623 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 624 |
*/ |
| 625 |
define ('FTP_IMAGE', 2); |
| 626 |
|
| 627 |
/** |
| 628 |
* <p> |
| 629 |
* Automatically determine resume position and start position for GET and PUT requests |
| 630 |
* (only works if FTP_AUTOSEEK is enabled) |
| 631 |
* </p> |
| 632 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 633 |
*/ |
| 634 |
define ('FTP_AUTORESUME', -1); |
| 635 |
|
| 636 |
/** |
| 637 |
* <p> |
| 638 |
* See ftp_set_option for information. |
| 639 |
* </p> |
| 640 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 641 |
*/ |
| 642 |
define ('FTP_TIMEOUT_SEC', 0); |
| 643 |
|
| 644 |
/** |
| 645 |
* <p> |
| 646 |
* See ftp_set_option for information. |
| 647 |
* </p> |
| 648 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 649 |
*/ |
| 650 |
define ('FTP_AUTOSEEK', 1); |
| 651 |
|
| 652 |
/** |
| 653 |
* <p> |
| 654 |
* Asynchronous transfer has failed |
| 655 |
* </p> |
| 656 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 657 |
*/ |
| 658 |
define ('FTP_FAILED', 0); |
| 659 |
|
| 660 |
/** |
| 661 |
* <p> |
| 662 |
* Asynchronous transfer has finished |
| 663 |
* </p> |
| 664 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 665 |
*/ |
| 666 |
define ('FTP_FINISHED', 1); |
| 667 |
|
| 668 |
/** |
| 669 |
* <p> |
| 670 |
* Asynchronous transfer is still active |
| 671 |
* </p> |
| 672 |
* @link http://www.php.net/manual/en/ftp.constants.php |
| 673 |
*/ |
| 674 |
define ('FTP_MOREDATA', 2); |
| 675 |
|
| 676 |
// End of ftp v. |
| 677 |
?> |