Sharing a shopping cart between 2 sites...

This is a discussion on Sharing a shopping cart between 2 sites... within the PHP Language forums, part of the PHP Programming Forums category; Hello, Just a little problem. I want to share a shopping cart between 2 php sites for example foo and ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-28-2003
CanardWC
 
Posts: n/a
Default Sharing a shopping cart between 2 sites...

Hello,

Just a little problem. I want to share a shopping cart between 2 php sites
for example foo and fii.
There'is no login / password solution wanted, so i must use cookie and
session.

If i use this http://www.foo.com and http://www.fii.com the session_id()
will be different in the 2 sites so i can't recognize the user.

If i use CNAME with a common domain 'stuff'
http://foo.stuff.com, http://foo.stuff.com the session_id() will different
but i can use this:
setcookie ("TestCookie", $value_md5,time()+3600, "/", ".stuff.com", 0); the
cookie will be accessible from the 2 sites, not the $_SESSION but i can put
my vars in database using TestCookie as id.

BUT, my boss want not an alias url, he wants http://www.foo.com, so i think
it's impossible. Am I right ?

PS: pointing http://www.foo.com to http://.foo.stuff.com doesn't change the
url so it doesn't resolve anything
PS: using only remote ip to identify someone is impossible because of proxy,
intranet etc...


Reply With Quote
  #2 (permalink)  
Old 10-28-2003
Dirk Engels
 
Posts: n/a
Default Re: Sharing a shopping cart between 2 sites...

CanardWC wrote:

> Hello,
>
> Just a little problem. I want to share a shopping cart between 2 php sites
> for example foo and fii.
> There'is no login / password solution wanted, so i must use cookie and
> session.
>
> If i use this http://www.foo.com and http://www.fii.com the session_id()
> will be different in the 2 sites so i can't recognize the user.
>
> If i use CNAME with a common domain 'stuff'
> http://foo.stuff.com, http://foo.stuff.com the session_id() will
> different but i can use this:
> setcookie ("TestCookie", $value_md5,time()+3600, "/", ".stuff.com", 0);
> the
> cookie will be accessible from the 2 sites, not the $_SESSION but i can
> put my vars in database using TestCookie as id.
>
> BUT, my boss want not an alias url, he wants http://www.foo.com, so i
> think it's impossible. Am I right ?
>
> PS: pointing http://www.foo.com to http://.foo.stuff.com doesn't change
> the url so it doesn't resolve anything
> PS: using only remote ip to identify someone is impossible because of
> proxy, intranet etc...


Hi,

I think you will need a custom session handler. If you save your sessions in
the db, you can recall the session from multiple sites. See for more
informatie the article at www.phpbuilder.com

--
BOFH Excuse #230:

Lusers learning curve appears to be fractal

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0