Martin Magnusson wrote:
> diablo wrote:
>> I want to offer a download to people for a certain amount of time - after
>> the link expires.
>>
>> basically the setup is that they buy an ebook and receive an email with a
>> link to download - but the link should only be valid for a week.
>
> I don't believe that's possible using only HTML. You would have to
> remove the file manually or have a server-side script to automate it.
>
> / martin
Create one file with the link in existence, say index.html
Create another file without the link, say index2.html
Set up a cron job for the day of expiry, say:
20 22 24 * * cp ~/index2.html ~/index.html; rm ~/index2.html
(this can be made more elegant, I know)
It will remove the link at 10:20 PM on the 24th of the month.
Roy
--
Roy S. Schestowitz
http://Schestowitz.com
|
|