php - setcookie from subdomain to domain -


I was really fighting on this issue because I was reading through a lot of threads here, but no one Actually my fit was not needed. So, I have:

  mydomain.com (which is the game's portal, global settings and stuff) game.mydomain.com (which is the real game)  

The problem is I want to set a cookie that is available globally, but game.mydomain.net , mydomain.net (and whatever I'm going to create a subdomain in the future.)

I am trying to set the cookie to another subdomain as I have read that the subdomain has used the original domain as a cookie However contrary (not that funny, and I think I read it wrong) do. Whatever, so I have made another account. Mydomain.com (from which I am making an AJAX call form mydomain.net, which can authenticate user) and I

  setcookie ('session', $ value, time) 2592000 (one month), '/', '.tribul.net'); Then, return the success message and refresh the main page on mydomain.net so that she can read the new cookie value. The problem is that there is no cookie set. I am also trying to set cookies from mydomain.com (like .tribul.net) so it can be avaialable on all subdomains but this is only available on the main domain .. so .. what's wrong with me?  

I need to add all subdomains and domains to the same cookie, to make a notice, I am setting a cookie in the backend file named process.php (placed in account.domain.com ) Try it as setcookie ('session', $ value,

Time () + 2592000, '', '.tribul.net');


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -