NYCPHP Meetup

NYPHP.org

[nycphp-talk] Force download

Michael Sims jellicle at gmail.com
Tue Sep 12 15:02:30 EDT 2006


On Tuesday 12 September 2006 2:29 pm, Nathan Lavertue wrote:

> 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.

Some browsers continue, in 2006, to ignore all hints about what the 
appropriate filename of a downloaded file should be.  Try hitting the 
download URL like this:

http://yoururl.com/download.php?foo=MAQ09718.MP4

The browser may well be stupid enough to just grab the last part of the URL 
and use that as the filename of the downloaded file.

Michael Sims



More information about the talk mailing list