I have problems to password protect images, it don’t show any picture…
then I try it, my browser console say:
“Resource interpreted as document but transferred with MIME type image/jpeg.”
Any Idea?
//Usage: 
session_start();
$path = '/path/to/images/';
if (is_file($path . $_GET)) {
$f = $path . $_GET;
} else {
$f = $path . 'not_found.jpg';
}
if ($_SESSION == false) {
$f = $path . 'req_auth.jpg';
}
header('Content-type: image/jpeg');
$im = @ImageCreateFromJPEG ($f) or // Read JPEG Image
$im = @ImageCreateFromPNG ($f) or // or PNG Image
$im = @ImageCreateFromGIF ($f) or // or GIF Image
$im = false; // If image is not JPEG, PNG, or GIF
if (!$im) {
readfile ($f);
} else {
@ImageJPEG($im);
}
?>