This shouldn't be too difficult to code. Let's assume that you have a table in your database that has the all the image references stored with the time and date. All you would need to do is to constantly loop through the database and check each file name with the filectime() function against what is stored in the database, if it has changed, update it.
You also need to look into set_time_limit() so that your script can run longer than the normal execution time....
If you need help with this, let me know
Matt Wade
codewalkers.com