delphi123 Posted August 30, 2009 Share Posted August 30, 2009 Hi all, I'm needing to create a script that will search through all directories on my site and list all files with timestamps more recent than x days. (I'm wanting to use it as a way of monitoring files that are added to check that the site is secure) Can anyone give me a few pointers as to useful functions or whether this is possible in php? Quote Link to comment https://forums.phpfreaks.com/topic/172497-search-by-file-date/ Share on other sites More sharing options...
abazoskib Posted August 30, 2009 Share Posted August 30, 2009 scandir() - to scan a folder for other folders/files is_dir() - to check if a folder is a directory, as opposed to being a file is_file() - check if it is a file you'll also need to be able to parse the folder names using explode() or regex/eregi Quote Link to comment https://forums.phpfreaks.com/topic/172497-search-by-file-date/#findComment-909393 Share on other sites More sharing options...
RussellReal Posted August 30, 2009 Share Posted August 30, 2009 fileatime last time it was accessed... filectime creation time filemtime last modified time Quote Link to comment https://forums.phpfreaks.com/topic/172497-search-by-file-date/#findComment-909397 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.