At 11:01 12.07.2001 -0700, Fernando wrote:
>I want to keep track of the member of some area of my site since the day
>they sign up. I want to count 31 days since the day The sign and pay for
>the service by credit card. The think that i don't know is how to make the
>day of sign a integer like 952582121 and then substract day by day once it
>get 31 days, to drop him from the database. I want to know the time
>function to do that job. Please give a hand with that. Thanks a lot. I
>only want this piece of code to keep the track.
my $seconds_in_one_day = 60 * 60 * 24; # 60 seconds * 60 minutes = seconds
in one hour, one hour * 24 = seconds in one day
my $now = time; # $now contains a number which is the number of seconds
that have passed since 1 1 1970 to this moment
my $expires = $now + ($seconds_in_one_day * 31); # get the expiration date
(31 days from $now)
stick $expires in your database
every time the user logs in, check the current time against their
expiration date
ChargeThemMoney() if(time >= $expires);
Aaron Craig
Programming
iSoftitler.com