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
Code:
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.
so i should think of checking the HTTP_USER_AGENT
and do the increment if the request is not from a crawler.
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