hmm jeg kan ikke få det til at virke:
her er det jeg har lavet indtil nu:
http://www.psycotics.dk/psycotics/upload/files/cwd.php------[ .htaccess ]------
Action php-img-parser /web/www.psycotics.dk/www/psycotics/upload/files/show_img.php
<FilesMatch ".*.(jpe?g|png|gif)$">
SetHandler php-img-parser
</FilesMatch>
IndexIgnore not_allowed.gif show_img.php picture_not_found.jpg
------[ show_img.php ]------
<?php
$img = array_pop(explode("/", $_SERVER['PATH_INFO']));
$content_types['jpeg'] = "image/jpeg";
$content_types['jpg'] = "image/jpeg";
$content_types['gif'] = "image/gif";
$content_types['png'] = "image/png";
if (file_exists("./".$img)) {
$url_ref = parse_url($_SERVER['HTTP_REFERER']);
if ($url_ref[host] == $_SERVER['HTTP_HOST']) {
header("Content-Type: ".$content_types[array_pop(explode(".", $img))]);
readfile($img);
}
else {
header("Content-Type: ".$content_types['gif']);
readfile("not_allowed.gif");
}
}
else {
header("Content-Type: ".$content_types['jpg']);
readfile("picture_not_found.jpg");
}
?>
-selve upload-siden:
http://www.psycotics.dk/psycotics/upload-fil på en anden server der linker til billed på psycotics.dk:
http://www.thesprit.dk/test.htmlhvad gør jeg forkert?