Cookie issue
| From: | Marie Osypian | Date: | Thu, 05 Jun 2003 14:02:34 +0000 |
| Subject: | Cookie issue | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28349@lists.php.net to get a copy of this message | ||
We are having complaints on our site about users not being able to log-in
and we feel it maybe related to the setting of cookie. Here is the code
used. Can anyone give me insight.
/* some standard var's or other things like srand */
srand((double)microtime() * 1000000);
$includes_root = "$DOCUMENT_ROOT/includes";
$encoded_url = urlencode($REQUEST_URI);
if($_COOKIE["cookie_check"] != "Y")
{
setcookie("cookie_check", "Y", strtotime("+5 years"),
"/",
"$HTTP_HOST", 0);
}
if($_COOKIE["current_surfer_id"] == "" AND
$_COOKIE["cookie_check"] ==
"Y")
{
$current_surfer_id = rand(0, 16777215);
setcookie("current_surfer_id", $current_surfer_id, strtotime("+5
years"), "/", "$HTTP_HOST", 0);
}