Users online Users Registered ??

Results 1 to 2 of 2

Thread: Users online Users Registered ??

  1. #1
    Join Date
    Dec 1969

    Default Users online Users Registered ??

    how can i collect the first part "users online" without using Global.ASA + how do i then detect the user is registered.<BR><BR>Thanks very much all of you for the help :)<BR><BR>Mike

  2. #2
    Join Date
    Dec 1969

    Default RE: Users online Users Registered ??

    I am not really sure how to do this without using global.asa. Why not user it? It is an effective tool.<BR><BR>If you want to find out how many REGISTERED user there are, I would create a home page that forces a login by looking for the username and password from request.cookies (then you can have a link that says "If you are not Fernando Bump, click here")<BR><BR>Anyway, then you add to a global variable when a registered user logs on. I think this would work:<BR>&#060;% &#039; user just finished loggin in<BR><BR> Application.Lock<BR> Application("RegisteredOn") = Application("RegisteredOn") + 1<BR> Application.UnLock<BR>session("registered") = "yes"<BR>%&#062;<BR><BR>I guess the question is, how can you tell when a registered user logs off so you can subtract from that variable!?<BR><BR>This MIGHT WORK. You should test it on your global.asa:<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR><BR>Sub Application_OnStart<BR> Session.Timeout = 45 <BR> Application.Lock<BR> Application("WhosOn") = 0<BR> Application.UnLock<BR>End Sub<BR><BR>Sub Session_OnStart<BR><BR> Application.Lock<BR> Application("WhosOn") = Application("WhosOn") + 1<BR> Application.UnLock<BR><BR><BR>End Sub<BR><BR>Sub Session_OnEnd<BR> Application.Lock<BR> if session("registered")= "yes" then<BR> Application("RegisteredOn") = Application("RegisteredOn") -1<BR> end if<BR> Application("WhosOn") = Application("WhosOn") - 1<BR> Application.UnLock<BR>End Sub<BR><BR>&#060;/SCRIPT&#062;<BR><BR><BR>Give it a try! <BR><BR>Edward<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts