Not set_cookie not the attached function used below will work with Internet Explorer 6. It works perfectly with IE5.x, NS and Mozzilla. Anybody has a clue for this
incredible mess about cookies??
The HTTP headers i sent out are:
Content-type: text/html
Set-Cookie: sid=1530574333bf106719c1c1; expires=Tue, 13-Nov-2002 13:38:57 GMT; path=/
function PushCookie($name,$value) {
// By José Afonso Santos aka smog <smog@kaotik.org> - http://hero.kaotik.org/
// Getting the current date
$hour = date("H:i:s");
$year = date("Y");
$year++; // Adding one year to the current year
$day = date("d-M-") . $year ;
$day_off_the_week = date("D");
// Setting the validation of the cookie up to one year.
$validation = $day_off_the_week . ", " . $day . " " .
$hour . " GMT";
// Set a cookie's value.
$cstr = "Set-Cookie: $name=$value; expires=$validation; path=/";
Header('Content-type: text/html');
Header($cstr);
return $cstr;
}
echo PushCookie('sid',uniqid(rand()) );
?><h1>s:<?echo $sid?></h1><?
Reply to this message