|
This tutorial teaches you how to use a simple PHP script to force a file download. This is useful for files such as PDFs where you want the file to download rather than open in a browser window.
The technique can be expanded greatly in conjunction with a database and additional code for restricting access to certain visitors, tracking downloads, limiting how many times a file can be downloaded by a particular visitor, etc.
Tutorial and code by: Chuck Joslin
|