Hi again!

I'm using the session component, as documented at
http://manual.cakephp.org/view/173/sessions , and it's storing and
retrieving all the session variables I set just fine.

However, I'm trying to find the session ID - or anything else that's
unique to each visitor, but doesn't change each time they load a new
page - and I'm getting a bit stuck here.

I've tried echoing out PHP's session ID, as documented at www.php.net/session_id
, but it seems to change each time a page is loaded. I'm assuming
CakePHP is doing magical things with sessions that I just shouldn't
interfere with lest I break something, but please correct me if I'm
wrong about that.

So I looked at what $this->Session is storing, figuring that maybe
it's storing some kind of consistent ID somewhere. The closest I could
find was $this->Session->_userAgent , but that appears to just be a
hash of the browser name, nothing else, as someone else using the same
browser even on a different network will get the same value.

So is there anything that acts like a regular, consistent session ID?

If not, I can just set a hash of the user's browser, IP address, and
the current timestamp at the exact moment they visit the site and set
that as a regular session variable (ie each time the user loads a
page, check for this session variable, and if it's not set, generate
and set it), but that seems a bit long winded and a case of
reinventing the wheel when this is exactly what session IDs are for.

Thanks for any suggestions,
Zoe.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to