MD5 an image

I have an array which contains a list of valid image urls. I then cycle through the array to MD5 the image file one by one, which later go into a database. Even though all the images are valid and accessible, there are some occasion where the MD5 fails because it cannot open the file.

md5_file( failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

When I retry to MD5 the files again, it fails on the same files every time.

At a loss why this happens.

are the files on a remote server or on your local machine? for the latter, access the images through the file system, not through the web.

Yes are on the remote server yes.

So I should save then locally then MD5 them?

I’ll give it a go and see what happens

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.