PDA

View Full Version : Downloads script



Jack!
26-10-2011, 09:55 PM
I was wondering if anyone knew of any kind of script, where a user pays for something, the script confirms it, then generates a random download link, which is 1 use, for a file?

I have tried google, I can find the random 1 time download link, but nothing with any kind of payment system.

Tom
26-10-2011, 10:02 PM
I don't understand what you mean?

Jack!
26-10-2011, 10:34 PM
I don't understand what you mean?

Basically

1) User adds digital download to cart
2) User pays
3) Script see's that they have paid, and the money has gone in
4) Script generates a random download link to the file (www.web.com/file is made to www.web.com/download.php=23434234234)
5) User downloads the file, and the link is destroyed by the script.
6) Done,

triston220
27-10-2011, 08:24 AM
Use rand() to generate a random ID. Check if this ID exists in the database. If not, add it. The table will have the following structure:

`Generated`
`scriptid`


`scriptid` will link to a a table called `scripts`. This will contain the following:

`id` (The data we are linking to)
`filename`
`filelocation`

Get the relevant data and send the download. ^__^

Want to hide these adverts? Register an account for free!