title: How to share cookie on 2 sub domains?
body: <p>I would like to share a cookie across 2 domains as my mobile site runns on a subdomain.</p>
  
  <p>production server:</p>
  
  <pre><code>www.server.com
  m.server.com
  </code></pre>
  
  <p>development server:</p>
  
  <pre><code>rabbit.server
  rabbit.m.server
  </code></pre>
  
  <p>My PHP-code to set the cookie looks like this:</p>
  
  <pre><code>if ($settings['development'] == true) // intranet does not work with subdomains :-(
      setcookie($cookiename,$sessid, $expires,'/','',0);  
  else // production
      setcookie($cookiename,$sessid, $expires,'/', $subdomain.'.'.$domain['name'],0); 
  </code></pre>
  
  <p>How could I share this cookie across the 2 domains in order to have the client loged in on both sites?</p>