You are here: Re: can have a time expired link? « HTML « IT news, forums, messages
Re: can have a time expired link?

Posted by Roy Schestowitz on 06/08/05 18:18

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация