Releases: apfelbox/PHP-File-Download
New license & forcing to download
Force downloads
The method sendDownload
has now a second (optional) parameter, which forces the browser to download the file instead of using plugins to display the file directly (for example download the PDF file instead of displaying it with the Adobe Reader plugin directly in the browser).
Thanks @badgio
New license: BSD-3
I switched to BSD-3 instead of MIT. You basically still can use the library for everything you want (as specified by the license). 😎
Composer, namespace support, license
The library was updated to include composer support.
You can find it here now: https://packagist.org/packages/apfelbox/php-file-download or just use apfelbox/php-file-download
.
The library now uses an external class to implement the mimetype list and it should now be a more comprehensive list.
To avoid name clashes the file was moved to a namespace and therefore support for PHP 5.2 was dropped. Sorry about that :(
Also the library is licensed under MIT now, so you can do with it what you want.