Jump to content

Archived

This topic is now archived and is closed to further replies.

dagnasty

Sharing cookie across multiple domains?

Recommended Posts

Is it possible to use a single cookie across multiple domains?

for instance, www.server1.com and www.server2.com

As you can see, this method here only allows for a single domain.

setcookie("TestCookie", $value, time()+3600, "/directory/", ".example.com", 1);

It's possible to set from 1 domain that applies to a completely different domain, correct?

DO you suggest I just create 2 cookies?

Share this post


Link to post
Share on other sites
2 cookies is the way to go.  Cookies are set and read by the domain they're created from.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.