By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,826 Members | 835 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,826 IT Pros & Developers. It's quick & easy.

PHP and download problems...

P: n/a
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

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.";
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:


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&amp;name=Subtitles&amp;file =index&amp;req=GetIt&amp;lid=SubtitlesID">

Anyone can help?

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.