Web Analytics Made Easy -
StatCounter count online users? - CodingForum

Announcement

Collapse
No announcement yet.

count online users?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • count online users?

    Hi there. I want to implement a counter for the users that are visiting my page. Is it enough a session_start for each user? Every new browser i open it is counted in the counter. What i must do?
    Thx

  • #2
    You must change your code so that you don't get an extra count for a new window.

    If you need more specific feedback, then you best post some more details and maybe a bit of relevant code or so.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment


    • #3
      how?

      And how i can check if each new window comes from the same user? Plz help...

      Comment


      • #4
        And how i can check if each new window comes from the same user? Plz help...
        Your webserver does this autmatically based on the sessionID that is or is not sent with the request.

        The problem is most likely that you have cookies disable, and that you don't add the SID to the url that is opened in the new widow.
        You could achieve that with
        echo ('<a href="./yournewpage.php?sid=' . session_id() .'" title="blabla">New window</a>');

        If you need more specific feedback, then you best post some more details and maybe a bit of relevant code or so.
        Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

        Comment


        • #5
          Raf, you seem to be in the know, the problem is I am looking for the code to have a hit counter on my webpage, the problem is my current ASP solution is useless on my PHP server.... could you help?


          Thanks,

          T.Gunn

          Comment


          • #6
            Sure.

            But what help,do you need? Complete code? Do you have a punctual problem? General question about the best approach?

            If you just need someworking code, then run a search at www.hotscripts.com since this is about the most covered issue ever on the web and there is no point reinventing this.
            --> http://www.hotscripts.com/PHP/Tips_a...ers/index.html
            Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

            Comment

            Working...
            X