You are here: Re: show list of users online « PHP Programming Language « IT news, forums, messages
Re: show list of users online

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация