php cookie with domain parameter
I am unable to set a cookie in one domain and read it in another. I have tried a million different examples but i have had no luck at all.
can someone please point out what is going wrong?
domainone.com
setcookie('testcookie','cookie example',time()+30*24*60*60,'开发者_C百科/','domaintwo.com',false,true)
domaintwo.com
echo $_COOKIE[testcookie];
var_dump($_COOKIE);
This is impossible. Search for Cross Domain Cookie related questions on SO to see workarounds (though none is trivial).
精彩评论