Gossamer Forum
Home : General : Perl Programming :

Deleting from file based on expiration date...

Quote Reply
Deleting from file based on expiration date...
Hi,

I'm attempting to write a membership script in which access to password protected areas expires after a specified period of time.

Users register and their info is save to a file. Here is an example:

username:a28eA62qa0DyA:12-16-99:ted:tedd@ted.net:945339114:2:asdf main:houston, tx aasdf

The above format is username, password, date registered, first name, email, expiration date ($expires), address, city state zip

I calculate the expiration date based on the following:
$membershiplength = 30;
$expires = time() + 86400 * $membershiplength;

My problem is writing the code that will delete the user data from the file when access has expired.

Any samples or help would be appreciated!!!!

Thanks,

Tim
Subject Author Views Date
Thread Deleting from file based on expiration date... Tim Mousel 3565 Dec 17, 1999, 10:42 PM
Post Re: Deleting from file based on expiration date...
Eliot 3390 Dec 18, 1999, 12:21 PM
Post Re: Deleting from file based on expiration date...
Tim Mousel 3383 Dec 20, 1999, 11:58 AM
Post Re: Deleting from file based on expiration date...
widgetz 3380 Dec 24, 1999, 1:55 PM