neontwenty
11-13-2010, 06:01 AM
hi friends
how to count active session.
i have read few post that explains about incrementing an
application variable on session start and decrement it on session end
Sub Session_OnStart
Application.Lock
Application("total_visitors_atpresent")=Application("total_visitors_atpresent")+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("total_visitors_atpresent")=Application("total_visitors_atpresent")-1
Application.UnLock
End Sub
but what if the google/yahoo/bing bot visit the site.
the same thing happen and i should think of checking the HTTP_USER_AGENT
and do the increment accordingly.
then problem is how to i decrement while the session end. can we check
which session is ended. like is the bot session or is it the actual visitors session that ends. how do you do this?
thanks
how to count active session.
i have read few post that explains about incrementing an
application variable on session start and decrement it on session end
Sub Session_OnStart
Application.Lock
Application("total_visitors_atpresent")=Application("total_visitors_atpresent")+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("total_visitors_atpresent")=Application("total_visitors_atpresent")-1
Application.UnLock
End Sub
but what if the google/yahoo/bing bot visit the site.
the same thing happen and i should think of checking the HTTP_USER_AGENT
and do the increment accordingly.
then problem is how to i decrement while the session end. can we check
which session is ended. like is the bot session or is it the actual visitors session that ends. how do you do this?
thanks