random links or expiring links? HELP!
|
| View previous topic :: View next topic |
| Author |
Message |
marikatech
Joined: 01 Oct 2005 Posts: 1
|
Posted: Sat Oct 01, 2005 7:28 pm Post subject: random links or expiring links? HELP! |
|
|
Hi all,
Ok this is what I need to do. I sell hypnosis mp3 on my site, and so far, once the customer has paid, they are directed to another page on my site to start downloading their product.
Now, nothing so far prevents that person from simply copying the link and sending it to anyone they choose, so that others can get a free download. Unless I change the links daily, this continues to be a problem.
Is there a way, ...that I can give the customer a download link that will either expire after a time, like 12 hours, or is there a way to create 'random' links, that can only work once?
Or are there any apps out there that do this kind of thing?
Thanks...
marikatech |
|
| Back to top |
|
 |
|
|
webmaster Site Admin

Joined: 17 Aug 2004 Posts: 3590 Location: Sweden
|
Posted: Sat Oct 01, 2005 9:56 pm Post subject: Re: random links or expiring links? HELP! |
|
|
I would have done like this.
When a person buys a mp3, a unique number is generated by random and inserted in the database. THen you have a number which is 0 if the mp3 isn't downloaded yet, and 1 if it is.
Then you give the customer the link: http://www.site.com/download.php?id=youruniqueidthathasbeengenerated
Then they visit that download.php page, the you get the id ($_GET['id']) and check if the number is 0, if it is, download the file, else, just a message that a link can't be used twise.
I'm not sure exactly how to make so the mp3-file can't be downloaded just by entering the url to it. But I believ that it should be kept in a folder that isn't accessable from the web, so your php-script fetches it.
And by the way, welcome to DEVPPL |
|
| Back to top |
|
 |
causecaos
Joined: 26 May 2008 Posts: 1
|
Posted: Mon May 26, 2008 8:20 pm Post subject: Re: random links or expiring links? HELP! |
|
|
| Hi, im new to this but how would i do this? i want to have a site that sells a product and then emails a link to a customer and expires after first download? how would i code this or create this so that when its paid for the server or page would generate a link and email it to the customer? would really appreicate the help, thanks, tony |
|
| Back to top |
|
 |
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|