NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on January 07, 2009, 02:25:27 AM
-
Hi,
How can I count the number of user logged in and the number of visits per page to implement something like Moolets?
Thanks
-
Hi Michelis, The easiest method is to use the free tool at GoStats.com. I also posted an example app some time back under the share knowledge forum.
-
OK, thanks
But what if I need to show how many Users are loged in?
Thanks again.
-
p_web.requestdata.webserver._Wait()
counter = 0
loop x = 1 to records(p_web.requestdata.webserver._SessionQueue)
get(p_web.requestdata.webserver._SessionQueue,x)
if p_web.requestdata.webserver._SessionQueue.LoggedIn
counter += 1
end
end
p_web.requestdata.webserver._Release()
Cheers
Bruce
-
Thanks! but...
Where to add this code?
Suppouse the Frame example with the login/logout before the xp-taskbar menu, if I want to show the counter after the logout button, before the menu?
Or there are another smart way to show it?
Thanks again
Alberto
-
Hi Alberto,
How are you planning for the user to ask for this value?
Remember the browser model is _always_ that the browser asks.
If you put it in the header pane of the frame it'll only get updated when they refresh
the header page - which I'm thinking is not often.
Where to put the code?
put it just before the value is used.
So if you've put it in a page, calculate it just before the value is included on the page.
Cheers
Bruce