$last_mod) { $last_mod = filectime($image); $last_image = $image; } } if (empty($last_image)) { # send error header('HTTP/1.0 404 Not Found'); die("

404

\nImage not found."); } else { # send image header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($last_image) . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($last_image)); readfile($last_image); } ?>