Re: multisite hit counter, includin session statistics

From: Date: Wed, 05 Jun 2002 11:56:54 +0000
Subject: Re: multisite hit counter, includin session statistics
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-100683@lists.php.net to get a copy of this message
Well, I'm feeling like an idiot. I was counting cookies must be sent before any other headers are sent....man, how is possible it is working? I know how to program that, but haven't known cookies/sessions works also when initialised this way... Thanks a lot and sorry. Minca > What have you tried so far? I assume you know how to create the actual > image, or will learn later. > > For your code, just try to start a session and set a variable within it. > Each time this script is run, that means a page is being requested. So after > you start your session, check and see if that variable is registered within > it. If it is, that means the user has already been browsing this page and > you shouldn't increase the count. If the variable isn't set, then the > session is new, and it's a new visitor. > > Keep in mind that once the user closes the browser, and then comes back to > your site in a new window, then the session will not exist and they will be > considered a "new" user. > > Have you tried anything so far? > > ---John Holmes... > > ----- Original Message ----- > From: "Martin Smetak" <minca_php_general@no9.cz> >

« previous php.general (#100683) next »