DrSlony Posted March 19, 2007 Share Posted March 19, 2007 Hey I am trying to make my website, lets call it 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 www.other.org Running the code below from 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 www.other.org to the domain (as below) will enable www.other.org to read the cookie that 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? Link to comment https://forums.phpfreaks.com/topic/43368-cookie-for-different-domain/ Share on other sites More sharing options...
SammyGunnz Posted March 19, 2007 Share Posted March 19, 2007 1. Not very secure and very exploitable. 2. Cookies cannot be read across different domains. However, if you administer both sites, you can share a SQL database where session information can be stored and referenced for comparison. Link to comment https://forums.phpfreaks.com/topic/43368-cookie-for-different-domain/#findComment-210607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.