The file has been downloaded successfully but the extension name of the file is not .ZIP ...
the extension name of the file downloaded from the script was .php3
what's wrong with my code? please help.... thanks in advance!
<?php
# <a href="showzip.php3?id=file.zip">
$file = getcwd() . "/contents/protected_images/" . $_GET['id'];
$handle = fopen ($file, "rb");
$size = filesize ($file);
$cont = fread ($handle, $size);
fclose ($handle);
$encimg = base64_encode($cont);
$imgcode = chunk_split("$encimg",30,"'.'");
header ("Content-type: application/zip");
header("Content-length: " . $size);
echo base64_decode ($imgcode);
?>