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" <[EMAIL PROTECTED]>
To: "'bk'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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:[EMAIL PROTECTED]
> > Sent: Wednesday, May 28, 2003 5:35 AM
> > To: [EMAIL PROTECTED]
> > 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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to