Jump to content

Sharing cookie across multiple domains?


dagnasty

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?
Link to comment
https://forums.phpfreaks.com/topic/21485-sharing-cookie-across-multiple-domains/
Share on other sites

Archived

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

×
×
  • Create New...

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.