Jump to content

Expiring download links


Wildhalf

Recommended Posts

Hi all,

 

I assume this is possible but can not figure out how to do it. I was wondering if anyone could point me in the right direction. I want to create a script that sends customers a link that expires after 24hours. This way they can not send out the link to anyone else.

 

hope this is enough info.

 

kieron

Link to comment
https://forums.phpfreaks.com/topic/72873-expiring-download-links/
Share on other sites

When you give out a link, you can store it in the database along with the date you gave it out. Then setup a cron that will delete all the links in the database that are 24+ hours old each day. When a user goes to a link, check if that link exists in the DB, and if it doesn't, it gives them an error.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.