Testing for session without setting cookies
| From: | Simon Woods | Date: | Sat, 10 Mar 2001 20:01:53 +0000 |
| Subject: | Testing for session without setting cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43339@lists.php.net to get a copy of this message | ||
Hi All,
Sorry if I am asking a vfaq but I was unable to find anything in the archives.
I am using PHP4 with session handling to track users which have logged in to my server.
I would like to (non intrusively) check to see if a user is logged in without having to start a new session. 95% of my users do not log in at all and do not want to be fed with cookies for no apparent reason. I wanted to avoid giving my visitors the impression that I am tracking them as well.
I could check to see if the cookie PHPSESSION or what ever I called my cookie has been returned by the browser, but I have no guarantee that the session is still or at all valid. Checking to see if there are corresponding session files or writing my own handler start to get over complicated.
I hope that I have overlooked something.
Thanks in advance,
--
Simon Woods
Siemens Business Services
SBS EBS D CKS
Munich Germany 089 / 636 54347