Hello, i want to print on my website how many people are viewing it. I thought doing it with cookies:
1. Give the guest a guest cookie. Increase a static variable "guest".
2. If he registers, give him a user cookie. Decrease "guest" by 1 , Increase "user" by 1. (_Problem_: how to delete his guest cookie? It's MaxAge is -1 )
3.If user/guest exits delete the corresponding cookie and decrease "guest" / "user" variable.
I found out that the api doesn't give such options as deleting a cookie, or notifying that it expired/quit. So how could it be done? Is there some trick i need to know or maybe i should try a new method doing that?