Posted 27 September 2006 - 06:10 AM
setcookie("cookie", $value, time()+31556926, "/", ".website.com", 1);
but doesn't, however this does:
setcookie("cookie", $value, time()+31556926);
The problem is that I need to set cookies for several domains. What's up with it? I don't seem to be missing anything.
Posted 27 September 2006 - 06:42 AM
If your wanting to set multiple different domains with the same cookie i.e www.example.com, www.example2.com, to my knowledge it can't be done with the setcookie as the cookie is only available to the domain that the setcookie function is executed on.
Posted 27 September 2006 - 02:37 PM
Correct. Multiple domains, not subdomains.
Posted 27 September 2006 - 02:42 PM
<?php setcookie("cookie", $value, time()+31556926, "/", ".website.com", 1); ?>
By setting "secure", the last parameter in your call, 1, a secure HTTPS connection is required for the cookie to be set.
Secure: Indicates that the cookie should only be transmitted over a secure HTTPS connection. When set to TRUE, the cookie will only be set if a secure connection exists. The default is FALSE.
so simply make it
<?php setcookie("cookie", $value, time()+31556926, "/", ".website.com"); ?>
Posted 27 September 2006 - 03:59 PM
Do you have any idea how I'd go about setting a cookie for a domain other than the one currently visited? It's not letting me do it right now.
Posted 28 September 2006 - 05:00 AM
I'm all out of ideas. I've tried using frames and iframes and it works in firefox but not in IE.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users