On my project I have image linked from other domain
<img src="http://www.somewhere.com/images/whatever-image.jpg">
I would like to resave it locally with some name based on its original src-attribute the way I can check later if I have already saved this image locally or not. My question is, when I use md5() on src-attribute is it then unique? Example:
$src = "http://www.somewhere.com/images/whatever-image.jpg"
if (file_exists('local_path'.md5($src)) {
...
}
Can I rely on md5() in this case? If not, how this can be done properly?