Hi Rhys,
There are 2 approaches to this.
The first is to put a "timer" into the web page so that you can see the timer, and work from there.
This is a bit icky though. Firstly you're generating extra traffic, and of course it doesn't tell you if the user just left their browser on that page overnight.
A better approach is to make use of the Session Queue. By querying this at regular intervals you can take "snap shots" of who is online, and who is not.
Better yet, all you really need to trap is
a) when the user logs in and
b) when he either logs out, or the session automatically terminates.
The first part is easy to do (since you have to manage the login anyway).
The second bit is also easy, if a bit cunning.
the WebServer procedure contains an object based on the NetWebServer class. So in this is a method called _DeleteSession.
This method is called whenever a session is deleted (meaning it has been inactive for a period of time). So in this method, before the parent call, you can add any code you like.
At that point you've got to be a bit careful, because you're working inside the server (which is shared.) Plus the normal GetSessionValue changes to _GetSessionValue so the code would look something like this;
err Long
x = self._GetSessionValue(p_SessionID,'whatever',err)
if err = 0
! do something with x
end
cheers
Bruce