I want to send an image with an other image name than the original and I don't want want to use rename and copy commands. In the code the image $image will sent to the browser. I want to send THAT image with another name which IU can define.
Anybody?
$image="$root_database/$row[im_user_id]/$locatie$im_original";
if( file_exists("$image")) {
if ($fd = fopen ($image, "rb")) {
$fsize =filesize($image);
$fname = basename ($image);
header("Pragma: ");
header("Cache-Control: ");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"".$fname."\"");
header("Content-length: $fsize");
fpassthru($fd);
}
}