Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: can have a time expired link?

  • Subject: Re: can have a time expired link?
  • From: Roy Schestowitz <newsgroups@schestowitz.com>
  • Date: Wed, 08 Jun 2005 16:18:12 +0100
  • Newsgroups: alt.html
  • References: <R6Dpe.16869$iy2.6561@newsfe1-gui.ntli.net> <1118243532.a8f23e21662617f4818d6eb87cf9375d@teranews>
  • User-agent: KNode/0.7.2
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

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index