Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


random links or expiring links? HELP!



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
marikatech



Joined: 01 Oct 2005
Posts: 1

PostPosted: Sat Oct 01, 2005 7:28 pm    Post subject: random links or expiring links? HELP! Reply with quote

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
View user's profile Send private message
webmaster
Site Admin


Joined: 17 Aug 2004
Posts: 3642
Location: Sweden

PostPosted: Sat Oct 01, 2005 9:56 pm    Post subject: Re: random links or expiring links? HELP! Reply with quote

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
View user's profile Send private message Visit poster's website
causecaos



Joined: 26 May 2008
Posts: 1

PostPosted: Mon May 26, 2008 8:20 pm    Post subject: Re: random links or expiring links? HELP! Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
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:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap