No images in this repository’s iceberg at this time
Download raw (398 bytes)
<?php
// secure_image.php
$path = $_GET['p'];
$hash = $_GET['h'];
if(file_exists($path))
{
$sum = md5_file($path);
if($hash === $sum)
{
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mt = finfo_file($finfo, $path);
header("Content-length: ".filesize($path));
header("Content-type: " . $mt);
readfile($path);
finfo_close($finfo);
}
}
?>