hello,
I have made a program ,that helps in downloading exe files from server which is stored in database as binary data. Now when providing data for the download , problem i m facing is that, file extention is not same the one i want to download (like if i want download exe file , it gives NETZIP file option) and download process never ends ,even after file has been downloaded.. sample code being used is
<?
$filename="lha.exe";
$fd = fopen( $filename, "r" );
$contents = fread( $fd, filesize( $filename ));
fclose( $fd );
Header("Content-type: application/octet-stream");
Header("Content-Disposition: attachment; filename=$filename");
Header("Content-Description: PHP3 Generated Data");
echo $contents;
?>
u can check its demo at,
http://www.sarjen.com/file1.php3
pls, let me know what to do ??
thanks in advance,hiral