What\'s a good way to create a unique name for an image that my user is uploading?
I don\'t want to have any duplicates so something like MD5($filename) isn\'t suita
I'd recommend sha1_file() over md5_file(). It's less prone to collisions. You could also use hash_file('sha256', $filePath) to get even better results.
sha1_file()
md5_file()
hash_file('sha256', $filePath)