How to auto create a temp page and auto delete it after a few days?
My purpose is to submit the page's link to user email for downloading my software from it.
User must download the software in a few of days, otherwise the page will be deleted and downloading is invalid.
I need php or JavaScript code.
thanks
Create a temp page
Moderator: General Moderators
-
AXEmonster
- Forum Commoner
- Posts: 34
- Joined: Fri Sep 05, 2003 11:27 am
- Location: newcastle UK
Re: Create a temp page
what you need to do is store the links in a database
these links are in the user table and each user row has a column to hold the link for that download. The user row also holds an expiry date which when called by a script (or when the user logs in) the links would be deleted or scrambled (deleted is best)
does this make sense?
these links are in the user table and each user row has a column to hold the link for that download. The user row also holds an expiry date which when called by a script (or when the user logs in) the links would be deleted or scrambled (deleted is best)
does this make sense?
Re: Create a temp page
Or you can use filemtime() to get the last date of the file compare it to the current date by strtotime() and if it's greater than X days old unlink() the file and it will be deleted. Hope this helps some.