<?
$id = $_GET['archivo'];

$enlace = "admin/imagenes_galeria/".$id;
$rest = substr($id, -3);  
header ("Content-Disposition: attachment; filename=".$id);
header ("Content-Type: image/$rest");
header ("Content-Length: ".filesize($enlace));
readfile($enlace);

?> 
