");
// open the directory containing the corrupted versions
$dir = opendir("$fname-corrupted");
// list all files in the corrupted directory
while($file = readdir($dir)) {
// skip directories in the corrupted folder
if(is_dir("$fname-corrupted/$file")) continue;
// show corrupted image
echo("