PHP ftp_nb_continue() Function
Example
Download a file from the server, continue downloading (non-blocking) while doing something else:
<?php
// initiate download
$d = ftp_nb_get($ftp_conn,
"local.txt", "server.txt", FTP_BINARY)
while ($d == FTP_MOREDATA)
{
// do whatever you want
// continue downloading
$d = ftp_nb_continue($ftp_conn);
}
if ($d != FTP_FINISHED)
{
echo "Error downloading file.";
exit(1);
}
?>
Definition and Usage
The ftp_nb_continue() function continues to receive/send a file to the FTP server.
Syntax
ftp_nb_continue(ftp_connection);
Parameter | Description |
---|---|
ftp_connection | Required. Specifies the FTP connection to use |
Technical Details
Return Value: | This function returns one of the following values:
|
---|---|
PHP Version: | 4.3+ |
PHP FTP Reference