Fbsd1 wrote:

> I have php code on home page to count how many times it is accessed from
> the internet. Problem is pages deeper in website can jump back direct to
> home page and this again gets counted.
> Is there any way to give the php counter routine intelligent so it will
> bypass bumping the counter on accesses coming from pages in the site?

Just a very generic suggestion: Use session. If a session has not been 
established count the visit, set a session cookie and then whenever a 
jumpback happens check for session cookie. If there is a session cookie then 
don't increment. 

This is a portion of how most simple login pages function. Plenty of code 
samples and examples around the net that you can lift and get ideas. Just 
look for PHP "Login" pages.

Probably better and easier ways, but this is what jumps out first. 


freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to