RE: [PHP] Weird domain seting in setcookie()
| From: | Bob McConnell | Date: | Tue, 14 Jul 2009 15:46:16 +0000 |
| Subject: | RE: [PHP] Weird domain seting in setcookie() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295372@lists.php.net to get a copy of this message | ||
From: Michelle Konzack
>
> on two websites I have encountered that cookies are not working
properly
> and are accesibel from other subdomains which I do not want. The
line
> is:
>
> setcookie('AdminOnCrack', $drug, $timeout, '/',
$_SERVER['HTTP_HOST']);
>
> but the "domain" is always prefixed with a ".".
>
> OK, now I have tested it using:
>
> setcookie('AdminOnCrack', $drug, $timeout, '/',
> 'myspace.tdwave.net');
>
> but with the same problem. I do not want that the cookies are
available
> in <*.myspace.tdwave.net>.
>
> Any suggestions?
In Firefox 3.0 under Tools->Options->Privacy, uncheck "Accept
third-party cookies".
Bob McConnell