Sort of heartbeat |
8/9/2020 16:54:45 | |
| PHPRunner General questions | ||
|
A
asawyer13 authorDevClub member
As my user moves around my site, I'd like to update their user record in the database with the date/time.. Basically a form of heartbeat so I know the user is still doing work, and I could use that info to get a pretty good idea of how many users are in my web app at a given time. |
||
|
A
|
AlphaBase 8/9/2020 |
|
Alan, |
|
|
D
|
david22585 8/9/2020 |
|
Before display on each page, add code like this:
|
|
|
|
aadham 8/10/2020 |
|
As my user moves around my site, I'd like to update their user record in the database with the date/time.. Basically a form of heartbeat so I know the user is still doing work, and I could use that info to get a pretty good idea of how many users are in my web app at a given time. Do I put the code in the header or footer??? or where is the best place so it runs on each page refresh??? I might also want to put in other places so if they are on a screen that does searching, it may not refresh the page as they aren't actually moving from one page to another, but I can handle that with no problem. Alan
|
|
|
|
Sergey Kornilov admin 8/10/2020 |
|
Using AfterAppInit event or header file is the best option. This way you can only add your code to a single place instead of multiple event. |
|