PHP cookie for a different domain
Posted: Mon Mar 19, 2007 12:48 pm
Hey
I am trying to make my website, lets call it http://www.drslony.org, create a cookie that another website, from a family of websites that I run, will be able to access. Lets call the other one http://www.other.org
Running the code below from http://www.drslony.org will result in a cookie that only drslony.org will be able to access, right?
<?php setcookie("biscuit", "1", "0"); ?>
I assumed that adding http://www.other.org to the domain (as below) will enable http://www.other.org to read the cookie that http://www.drslony.org created, but it doesn't (or at least I don't know how to make it do so).
<?php setcookie("biscuit", "1", "0", "/", "www.other.org"); ?>
Can anyone help me out?
I am trying to make my website, lets call it http://www.drslony.org, create a cookie that another website, from a family of websites that I run, will be able to access. Lets call the other one http://www.other.org
Running the code below from http://www.drslony.org will result in a cookie that only drslony.org will be able to access, right?
<?php setcookie("biscuit", "1", "0"); ?>
I assumed that adding http://www.other.org to the domain (as below) will enable http://www.other.org to read the cookie that http://www.drslony.org created, but it doesn't (or at least I don't know how to make it do so).
<?php setcookie("biscuit", "1", "0", "/", "www.other.org"); ?>
Can anyone help me out?