Hi everybody
I'm writing a module for postnuke and MD-Pro to manage a subtitles
section, and I'm experiencing some troubles with the download
function.
It works properly if I click directly on the download link.
but I'm trying to do a redirect page, so that when the user clicks on
the link, a popup came on displaying a short text message, and after a
few seconds the download starts automatically.
Well, with firefox everything works fine, while with IE 6.0 (with all
upgrades installed), there's no way to let the browser display the
correct informations.
I use this piece of code to send headers to the browser:
// Now we send the file
Header("Content-Type: ".$filetype."; name=".$filename);
Header("Content-Disposition: attachment; filename=".$filename.";
size=".filesize($filelocation));
Header("Content-length: ".filesize($filelocation));
Header("Content-Description: downloaded from".pnGetBaseURL());
Header("Pragma: public");
IE always shows:
name: modules.php
type: PHP file
while firefox shows correct informations.
The link that points to the file is:
http://SITENAME/modules.php?op=modlo...id=SubtitlesID
were SITENAME and subtitlesID are dinamic fields.
As redirecting sistem, I use this line of code in the popup window:
<META HTTP-EQUIV="refresh" content="5;
URL=http://SITENAME/modules.php?op=modload&name=Subtitles&file =index&req=GetIt&lid=SubtitlesID">
Anyone can help?
Thanks.