Re: php force MP3 'save as' dialog



sorry, so looking throught seems quite similar to my version

does your version bring up the more standard "downloading" box (with a
progress bar and time remaining)




"Steve" <no.one@xxxxxxxxxxx> wrote in message
news:wNPth.33$eK3.29@xxxxxxxxxxxxxxx
| if(ini_get('zlib.output_compression')) {
| ini_set('zlib.output_compression', 'Off'); }

takes longer to check the 'if' condition than to just call
ini_set()...setting it 'off' has no effect when it is 'off' and, has the
correct effect when it is 'on'. further, iirc, if it is 'on', it comes to
the browser compressed but the browser uncompresses it once it is all
received. if the browser doesn't support compression, none of this matters
anyway.

| header("Pragma: public");
| header("Expires: 0");
| header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
| header("Cache-Control: private",false);
| header("Content-Type: audio/x-mp3");
| header("Content-Disposition: attachment;
| filename=\"".basename($FileURL)."\";" );
| header("Content-Transfer-Encoding: binary");
| header("Content-Length: ".filesize($FileURL));

these are the headers i usually use...although i have used force-download
before as well (sorry for the wrapping):

require_once 'site.cfg.php';
$fileData = '';
$fileName = $_REQUEST['fileName'];
$filePath = $site->uploadBaseDirectory;
if ($fileName != ''){ $fileData = @file_get_contents($filePath .
$fileName); }
header('pragma:
);
header('expires:
);
header('cache-control: private',
);
header('cache-control: must-revalidate, post-check=0,
ck=0' );
header('content-disposition: attachment; filename="' . $fileName .
);
header('content-size: ' .
);
header('content-transfer-encoding:
);
header('content-type:
);
echo $fileData;





.



Relevant Pages

  • RE: Opening a MS Access APP - if the SQL connection is not found.
    ... The suggestion about downloading a winform application would not work - as ... Maybe what I'll do is install the winform application to check for the SQL ... server connection and then launch the web page or the Access MDB, ... > that could happen if the browser were to allow a page you visit on the web to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: powerpoint viewer and pps on the web
    ... All they'll need to view it is a browser; MSIE is the preferred browser, ... As to downloading, you can't see much of anything on the web w/o downloading. ... Can visitors use the PowerPoint Viewer and view ... Steve Rindsberg, PPT MVP ...
    (microsoft.public.powerpoint)
  • Re: help with strange problem
    ... I'm sorry - my original post was too vague. ... browser, I see text and graphics - everything looks as it should. ... I ended up downloading Golive and the page renders ok there. ... Dreamweaver - so there must be some kind of error in the coding that DW is ...
    (comp.infosystems.www.authoring.html)
  • Re: cannot access internet/system restore/anti-virus... wuauclt. exe??
    ... A few days ago I tried to watch a show online and downloaded this ... After about an hour, my Firefox browser ... error message shows up: ... I tried downloading the Malwarebytes and SuperAntispyware, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Any Windows 95 Gurus??!!
    ... I see no reason why you could not download another web browser and load it ... Sometimes older drives won't read the copied cds. ... > I.E. uninstalled-no means of getting onto the net via a> browser and downloading an anti virus programme. ... > Have suggested downloading a browser from Tucows + Avast> anti virus,burning them onto CD,then installing them onto> the 95 machine. ...
    (microsoft.public.scripting.virus.discussion)