Geronantimo
Technical User
After the deployment of a website, I would like to periodically run a script to monitor specified directories and sub-directories for file changes. (I might also like to specify the file types by extension.)
My query is, can this be accomplished with PHP and if so, where should I start looking?
I have seen a very short post elsewhere that referred to using the MD5 checksum as a way of saving information about all of the files and then running a comparision after a period of time.
It might be sufficient to simply display file changes according to the datestamp.
The reason why I would like to be able to do this is that when an "upgrade" is available for an application, often it requires uploading many files to the server. I would like to know which files have changed since the previous upload so I can locate files that have been edited and not overwrite them before comparing their contents.
Might the best solution involve using a database to store the information about individual files?
Apart from the usefulness prior to an upgrade, this script would also be a useful security measure.
If any of this is possible, perhaps someone could start me off on the right track.
Thanks.
My query is, can this be accomplished with PHP and if so, where should I start looking?
I have seen a very short post elsewhere that referred to using the MD5 checksum as a way of saving information about all of the files and then running a comparision after a period of time.
It might be sufficient to simply display file changes according to the datestamp.
The reason why I would like to be able to do this is that when an "upgrade" is available for an application, often it requires uploading many files to the server. I would like to know which files have changed since the previous upload so I can locate files that have been edited and not overwrite them before comparing their contents.
Might the best solution involve using a database to store the information about individual files?
Apart from the usefulness prior to an upgrade, this script would also be a useful security measure.
If any of this is possible, perhaps someone could start me off on the right track.
Thanks.