The FTP server I am using supports a feature that allows downloaded files to be hidden once downloaded using quote lzdc on.
In the code below should make file 445387.oin NOT show up as it has already been downloaded. But when I list the directory it shows up.
if(ftp_login($ftp_conn, 'USERNAME', 'PASSWORD'))
{
ftp_pasv($ftp_conn, true);
//This should make file hidden that has been downloaded
ftp_raw($ftp_conn, "quote lzdc on");
$files = ftp_nlist($ftp_conn,'INVOICES');
var_dump($files);
}
array(3) {
[0]=>
string(12) "00_index.txt"
[1]=>
string(12) "00_index.htm"
[2]=>
string(10) "445387.oin"
}
The file 445387.oin has been downloaded so it should NOT show up in list.
RAW FTP Session showing how it should work:
ftp> ls
227 Entering Passive Mode (74,254,143,170,209,145)
150 Opening ASCII mode data connection for directory listing.
-r--r--r-- 1 owner group 1024 Dec 8 14:18 00_index.txt
-r--r--r-- 1 owner group 1024 Dec 8 14:18 00_index.htm
-r--r--r-- 1 owner group 5002 Dec 8 11:03 445387.oin
226 Transfer complete.
ftp> quote lzdc on
230 Limit Zero Download Count - Enabled
ftp> ls
227 Entering Passive Mode (74,254,143,170,209,146)
150 Opening ASCII mode data connection for directory listing.
-r--r--r-- 1 owner group 1024 Dec 8 14:18 00_index.txt
-r--r--r-- 1 owner group 1024 Dec 8 14:18 00_index.htm
226 Transfer complete.
Is there a way to do this in php?