View Single Post
Old 12-08-2007, 04:58 PM   #11 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by aristoworks View Post
Any ideas on taking some "part" of the image and running through md5 to get a unique string?
You can just hash the whole file contents, MD5 will be just fine for that.

php Code:
// Overly simple example of hashing a remote file
$file = file_get_contents('http://domain.com/file.jpg');
$hash = md5($file); // or, hash('md5', $file)
 
Salathe is offline  
Reply With Quote