I am trying to find a way to share cookies across multiple subdomains.
Setting cookie as:
setcookie('token', base64_encode(serialize($token)), time()+10800, '/', '.mydomain.com');
does just that. But there is a small problem. This will split cookies across all subdomains.
My problem is that I have other environments (Dev and test) configured on 2 subdomains. I am looking for a way to share cookies through "custom" subdomains. that is, a share in some subdomains, not a share of others. I am not sure if something like this exists.
Any help is appreciated. Thanks.
source share