Discussion Locked

PHP - Recursive Directory New File Scan

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok,here goes,

I have been looking through 100's of examples using PHP's directory interator's, to write a file scan output to a MYSQL database and then to a new file checker. If the initial dir() interator finds a duplicate file in the database then jump to the next new file scan.

However, the meat behind my thought is to enable a function to verify 0.day. So if the scan outputs a file that is not in the MYSQL directory scan DB it posts it to a new MYSQL database and is parsed into a neat tabled HTML file for my members.

A good example of what I am trying to do is located at "http://www.mininova.org." The main page changes on a daily basis to include the newest torrent's.

I'd like to think of it as a zero-day new file scan. I have only seen this done in a few places. Please let me know your thoughts.

1 reply

by tony hopkinson

Find all file created since a date is an OS function. If you can't rely on the date.
The find all files on path is also solved.

So either way you have a list of files.
put them in a table do an outer join with existing to get those that aren't, that's your esult, and then insert that into existing for the next run.

Way less roundy things to create.

HtHs

This discussion is closed to new replies.