note 79834 deleted from function.setcookie by bjori
| From: | bjori@php.net | Date: | Fri, 14 Dec 2007 19:57:15 +0000 |
| Subject: | note 79834 deleted from function.setcookie by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133472@lists.php.net to get a copy of this message | ||
Note Submitter: matt at doodoostyle dot com
Reason: bad code
----
A little snippet to find the base domain when dealing with the possibility of multiple subdomains in
HTTP_HOST
$arr = explode('.', $_SERVER['HTTP_HOST']); end($arr);
$cookieDomain = '.' . prev($arr) . '.' . next($arr);