title: Localhost Cookie
body: <p>I am using PHP under localhost (XAMPP).
  I am trying to set a cookie with .localhost as its domain.</p>
  
  <pre><code>setcookie($key, $value, $expire, $path, '.localhost', $secure, $httponly);
  </code></pre>
  
  <p>Because of multiple subdomains on real sites.
  It works by Firefox But it fails by IE8.
  I can restrict it by PHP coding then it would be neglected if localhost is as server domain. 
  But I am not sure that whether cause many problems on real site servers? Can I use it on real servers? .example.com without www. prefix might cause same problems? Is there any hack for this case?</p>