Log in

View Full Version : Resolved Making a "download.php" File



X96 Web Design
06-18-2009, 11:22 PM
I've searched on Google, but can't find anything... How do you make one of those PHP files that automatically shows a download prompt?

For example, if you go to download.php?file=filename.txt it'll show a download prompt instead of opening the file.

I've seen this used in many places, and can't seem to find any source code for it.

Thanks,
X96

thetestingsite
06-18-2009, 11:49 PM
Here you go, you can either learn from it or just use it:

http://www.zubrag.com/scripts/download.php

Hope this helps.

X96 Web Design
06-18-2009, 11:57 PM
Thanks! Exactly what I was looking for.

// X96 \\