[Phplib-users] Multi-domain sessions?
Brought to you by:
nhruby,
richardarcher
|
From: James S. <li...@br...> - 2002-05-12 14:45:16
|
I posted on this a while back but hadn't really thought through what I wanted to do. I have three sites which all share a single database and which I'd like to share a single shopping cart. The SSL certificate is only valid for one of the domains so I definitely need to be able to have that domain access carts started at either of the other sites. Two of the sites are on one server and the third is on another, along with the database. I'm using session4.inc and I'm guessing the best way to handle this would be to send three cookies when the user first visits any of the sites, one from each domain, each containing the session ID. I would then get the same session ID when the user went to any of the sites during that browser session. My initial attempt to do this involved hacking session4.inc so that if $cookie_domain is an array it sends a cookie from each domain listed but this doesn't appear to have worked. My sessions within one site have the same ID but when I move to either of the other sites I get a different ID. Any ideas? James. |