Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How should a timed session be implemented?

by z3d (Scribe)
on May 06, 2004 at 15:26 UTC ( #351155=note: print w/replies, xml ) Need Help??


in reply to How should a timed session be implemented?

Not sure if this meets your needs (or is even feasible) - but what if the webpages in questions were nested in a frameset without borders, where one of the frames is only a pixel or so high and uses a metarefresh to hit a form (timer) on the server? I haven't tried this, but in theory it might work. You could then just coalate the returns and get your online hours answer.



"I have never written bad code. There are merely unanticipated features."
  • Comment on Re: How should a timed session be implemented?

Replies are listed 'Best First'.
Re: Re: How should a timed session be implemented?
by eternius (Beadle) on May 08, 2004 at 10:19 UTC
    This works for me.

    I use a mix of hidden frames, DOM, JS and lots of perl for a "threaded" website.
    The thread frame refreshes itself every x seconds and updates a db field.
    And a cron job checks every 5 minutes, whether a user is actually online.

    So I can force logout :-)


    cheers
      Could you elaborate on your cron job... I am interested in this implementation. Thanks.
        well,
        the cronjob just runs over the session/login table and calculates whether
        a given time has been overstepped.
        if that is the case, the entry/session gets deleted/terminated.

        if you want to take a look at the website

        cheers

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://351155]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-03-22 02:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?