• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

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.

0
tong111797
Asked:
tong111797
1 Solution
 
xabiCommented:
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

xabi
0
 
tong111797Author Commented:
Is it .htaccess language ?

or perl code ?

0
 
xabiCommented:
It's ASP.

xabi

PS: Any doubt just ask
0
 
clockwatcherCommented:
Tong,

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.
0
 
kodiakbearCommented:
Fixed the -1 problem on this question.
Escrow points corrected.

kb
Community Support Moderator
Experts Exchange
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now