http://qs1969.pair.com?node_id=351155


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