CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
time ..



Mar 4, 2000, 8:50 PM

Post #1 of 4 (2463 views)
time .. Can't Post


A user logs in
User name is written to a file
Any one can hit 'See Who is On' link to view
which names are logged on to the file

Not a problem, easy in fact.

Ah, but what about accuracy?

If the user has not accessed the script (that was logged into) in over ten minutes (compared to system time), erase username from the text file.

Eh? Any takers?

Red Dragon

Mar 5, 2000, 8:35 AM

Post #2 of 4 (2463 views)
Re: time .. [In reply to] Can't Post

post the username and the time (in unix format) to the file and compare the time to current time and remove them after a specified period of inactivity.


Mar 5, 2000, 11:15 AM

Post #3 of 4 (2463 views)
Re: time .. [In reply to] Can't Post

Yes, basically you just restated my original post. I need to know how to do it -- thanks anyway.


Mar 6, 2000, 1:14 AM

Post #4 of 4 (2463 views)
Re: time .. [In reply to] Can't Post

Each time you script goes to enter another person into the file it goes through and checks each time and deletes any entry that is over say 10 mins. Or you can use CRON to check run your file to check for old entries every so often.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives