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(http://sample.com/2g3d4ogpvona142eqdhzqpx4w298600299.jpg): 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.