I imported a database of users from one website to another and for some reason a few of the images downloaded defaulted to a "Image not found" image - so I still ended up downloading an image.

So I'm not sure what profiles have this image, but I was thinking of getting a md5 or sha1 hash of the file (md5_file or sha1_file) and then comparing that hash to every image on my website.

So if the hashes match...
PHP Code:
$imageNotFoundHash md5_flle('...');
...
if(
$imageNotFoundHash == md5_file(DIR.$images[$i])) {
//ohh noooo the image is the default one!!

then does this mean that this code will work? Is the hash unique to any file contents?