Re: sessions and domains
| From: | CPT John W. Holmes | Date: | Wed, 28 May 2003 15:20:35 +0000 |
| Subject: | Re: sessions and domains | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149267@lists.php.net to get a copy of this message | ||
You'd really only have to pass the session ID to the other domains, since
all of the session files are located in the same directory. So, when linking
to one of the other domains, just include SID in the URL or form. Should be
painless.
echo '<a href="http://www.otherdomain.php/page.php?'.SID.'">Link
to other
domain</a>';
SID is a constant.
---John Holmes...
----- Original Message -----
From: "Steven Kallstrom" <stevenkallstrom@insightbb.com>
To: "'bk'" <brotherk@despammed.com>; <php-general@lists.php.net>
Sent: Wednesday, May 28, 2003 9:47 AM
Subject: RE: [PHP] sessions and domains
> Bk,
>
> You would have to somehow pass all session variables onto the
> new host since session variables are stored server-side. You would have
> to have a function that took all session variables and passed them to
> the new domain including session id... then you would need a function
> that would take those variables and make them session variables in the
> new domain...
>
> SJK
>
> > -----Original Message-----
> > From: bk [mailto:brotherk@despammed.com]
> > Sent: Wednesday, May 28, 2003 5:35 AM
> > To: php-general@lists.php.net
> > Subject: [PHP] sessions and domains
> >
> > Hi
> >
> > I've to set up a shared shopping cart to buy items
> > from four different sites and pay them at once
> > passing trough a single checkout.
> >
> >
> > Provided that these sites are hosted on the same
> > server (actually in the same directory), but have
> > different names, is it possible to share php
> > sessions across multiple domains? How?
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>