Jump to content

Cookie for different domain


DrSlony

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.