Re: Count visitors on my website



..oO(Hadron)

Michael Fesser <netizen@xxxxxx> writes:

Such "statistics" are never accurate. HTTP is a stateless protocol,
there's no such thing like a "currently online user". A user comes,
sends a request, gets a response and is gone. Next request, next user.

So you clearly have no clue.

Sure?

PHP maintains sessions and the user can be logged for that duration and
therefore only counted once.

You are the second one in this thread who obviously didn't read the "not
logged in" in the original post.

And what does session counting tell you? Sessions can be open for hours
without any user interaction. The user could have died already in front
of his monitor and his session would still be open.

Whatever way you go - it's always just guessing. So why bother at all?
Why show a questionable "information" that is of absolutely no use for
the visitor? Just to show how cool and active the "community" is? If you
want that you can use rand() - it's much easier than all others methods.

Micha
.



Relevant Pages

  • Re: how to resume a sleeping thread
    ... For every request that it gets it will span a new ... till it gets the response. ... Given a pointer to a session object and the knowledge ... awaken a worker to handle it. ...
    (comp.programming.threads)
  • Re: Count visitors on my website
    ... there's no such thing like a "currently online user". ... Next request, next user. ... of his monitor and his session would still be open. ... You can only go on the connections. ...
    (comp.lang.php)
  • Re: User control remember state across pages without session
    ... Its a shame Microsoft don't extend viewstate beyond a single page because it ... An HTTP Request is received by the web server. ... It sends a Response to the client. ... > Request for a Page comes from any client, the Session Collection has a new ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS bug-Concurrent request lock before IHttpModule.AcquireRequ
    ... into the session object. ... You can not have 2 simultaneous request for the same session. ... public partial class slow: System.Web.UI.Page ... public override void ProcessRequest ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS bug-Concurrent request lock before IHttpModule.AcquireRequ
    ... shutDownMessage, ... IHttpModule stores the Hashtable of session objects in a private member ... You can not have 2 simultaneous request for the same ... protected void Page_Load(object sender, EventArgs ...
    (microsoft.public.dotnet.framework.aspnet)