PDA

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


X96 Web Design
06-19-2009, 12:22 AM
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-19-2009, 12:49 AM
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-19-2009, 12:57 AM
Thanks! Exactly what I was looking for.

// X96 \\