Easy Tutorial
❮ Func String Ucfirst Func Simplexml Count ❯

PHP ftp_nb_get() Function



Definition and Usage

The ftp_nb_get() function downloads a file from an FTP server and saves it to a local file. (Non-blocking)

The function returns one of the following values:

Unlike ftp_get(), this function retrieves the file asynchronously. This means your program can perform other operations while the file is being downloaded.

Syntax

Parameter Description
ftp_connection Required. Specifies the FTP connection to use.
local Required. Specifies the local file to save the content to. If the file already exists, it will be overwritten.
remote Required. Specifies the path of the file to copy from.
mode Required. Specifies the transfer mode. Possible values: FTP_ASCII<br> FTP_BINARY
resume Optional. Specifies where to start copying in the remote file. Default is 0.

Example

This example copies text from "source.txt" to "target.txt":


❮ Func String Ucfirst Func Simplexml Count ❯