|
Posted by Sanders Kaufman on 08/22/07 04:41
Jerry Stuckle wrote:
> Short answer - you can't. You can tell when someone logged on, but not
> if they're still on the site.
Actually, you can. It' called a "beacon" and hackers use it all the time.
The problem is that your more tech-savvy users will see it, and get real
pissed off. Most folks don't like for you to *monitor* their activity -
even if you feel that your motives are benign.
There are a number of ways to do it, but the best one seems to be to
simply have a client-side script that sends a URL request every so often
to refresh an image (visible or not, but preferably visible - to calm
techie nerves). For example:
if (sTime > (sNow+15)){
MyImage.src = "myimage.php?" + sTime + "&" + sToken;
}
Then, have the PHP file generate the image and log the request.
Navigation:
[Reply to this message]
|