Forum Moderators: coopster

Message Too Old, No Replies

Protect file downloads

         

icemancast

5:12 am on Nov 12, 2007 (gmt 0)

10+ Year Member



here was a post from another forum that i put... the member suggested i serve up the file with a call

- script says "yes you have paid"
here is link <a href="file.php?1234567">download</a>

- file.php takes file from ...
/var/blah/downloads/product1.ext
.. and serves it to the user.

does anyone have any idea how i do it or some reference on what this procedure is actually called so i can research it.

[edited by: eelixduppy at 6:54 am (utc) on Nov. 12, 2007]
[edit reason] removed url [/edit]

jatar_k

2:11 pm on Nov 12, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



file.php would maybe use that id to query a db and get the actual name of the file

it would then set headers, include content from that file and output the file to the user

icemancast

4:50 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



that makes sense let me try this.

stajer

5:56 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



ideally fileid.php would also count the number of times that code/id was used and prevent it from being used more than once (or have many times you want).