how htaccess run only one script when login

I would like to run one script when user login into
member section and count the logon..

when use Action command, It run every time that
member access every file or dir.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi there:
in your memeber page (the page that runs the script) you must do something like this:

--------- 8< -------------
if session("logged") = false then
  Action ....
  session("logged") = true
  Application("users_logged") = Application("users_logged") + 1
end if
--------- 8< --------------

and in your global.asa add this line to the application_onstart

Application("users_logged") = 0

and this other lines in the session_onEnd

if session("logged") = true then
  Application("users_logged") = Application("users_logged") - 1
end if

so when you want to know how many ppl are logged you have the value in the Application("users_logged") var


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tong111797Author Commented:
Is it .htaccess language ?

or perl code ?

It's ASP.


PS: Any doubt just ask

This question's got nothing to do with ASP.  You may want to repost it in the CGI category.

BTW, I'm not a heavy Apache user, but that's my understanding of what the Action directive does, it runs your script whenever the particular mime-type is requested--  It's not a run once kind of thing.
Fixed the -1 problem on this question.
Escrow points corrected.

Community Support Moderator
Experts Exchange
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.