<?

include 'conf.php';
$url = ''.base64_decode($_GET['img']);
$inf=getimagesize($url); 
if ($inf){ 
if ($inf['mime'] == 'image/jpeg'){ 
header('Content-Type: image/jpeg'); 
$img=imagecreatefromjpeg($url); 
imagejpeg($img); 
} 
elseif ($inf['mime'] == 'image/png'){ 
header('Content-Type: image/png'); 
$img=imagecreatefrompng($url); 
imagepng($img); 
}else{ 
header('Content-Type: '.$inf['mime']);
echo file_get_contents($url); 
} 
}else{ 
header('Location: '.$papka.'img/no_image.gif'); 
}
?>