php - FTP incoming monitor (on upload) -


We have some 100 users who log in via FTP and uploading files. Our online system (PHP) should display the items that have been uploaded. I do not want to check all the different FTP folders to check for new files.

What is the best way to check new files with PHP without slowing down the server? For example, all users' folders have files, uploads / user1, / uploads / user2, etc. The following is the approach I have:

  • Check to see if the date of the folder revision has changed (if the date has changed since the last time), then a file Has come). Which PHP function can I use to check the modified date / time for the last time?
  • If the above date revision has changed, use the scanner () to go to the pickup directory in each directory that has changed to identify the files. Enable logging in your FTP server, and parse the logs, usually / var / log /


Comments