I have a php script that saves the file names of every file in directory to text file. That text file is then hashed. Here are the lines in my script:
$allnames = implode(",", $fileslist); file_put_contents($post_dir . "/md5file.txt",$allnames); $md5file = md5_file($post_dir . "/md5file.txt"); echo $md5file; If a new file is uploaded, removed, or a file name is changed then the hash will change. I need a way to check and see if that hash has changed or not.
strstrorstrposor any other piece of code (regex maybe) to find an exact match of a string. However, this would probably mean making a copy of the same file (at the same time) and match against it.