[nycphp-talk] Force download

Nathan Lavertue m2 at
Tue Sep 12 14:29:06 EDT 2006

Any reason why the following script wouldn't force download the file  
in question with the appropiate name in all situations? Works in a  
few browsers, but, not while using the Internet Browser on the PSP.  
Tries to save the file 'download.php' instead of the actual video file.


header("Pragma: no-cache");
header("Expires: 0");
header('Content-Description: File Transfer');
header('Content-type: application/force-download');
$filename = "MAQ09718.MP4";

header("Content-Disposition: attachment; filename=\"".basename 
($filename)."\";" );
header("Content-Length: " . filesize($filename));



Nathan Lavertue
Lead Designer & Developer - New Formats
Sony Music Studios - X Media Group

On Sep 11, 2006, at 11:53 AM, Aaron Deutsch wrote:

> Has anyone used the pear LiveUser auth classes?  Are they worth the  
> hassle of setting up and trying (also still in beta) or is there a  
> better/easier user login management tool available.
> thanks,
> aaron d.
> _______________________________________________
> New York PHP Community Talk Mailing List
> NYPHPCon 2006 Presentations Online
> Show Your Participation in New York PHP

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the talk mailing list