Hi,
Any idea for help, thx. a lot.
I've tried following both setcookie or mysetcookie methods.
Result is strange, Netscape could run very well. IE I got 2 cases:
setcookie
1, IE5 can add cookie but won't expire in 1 minute
IE5.5 can never add the cookie
mysetcookie
both IE5 & IE5.5 can't add the cookie.
function checkSession() {
$rw_cookies = getenv( HTTP_COOKIE );
if(!$rw_cookies)
{
$session = md5(uniqid(rand()));
//setcookie ("rw-main", "$session", time() + 60, "/", ".my.domain");
mysetcookie ("rw-main", "$session", "/", ".my.domain");
} else {
list ($k)=array(split("; ", $rw_cookies));
for($i=0; $i<count($k); $i++) {
list($cookie_name,$cookie_value)= split ("=", $k[$i]);
echo "Cookie Name: $cookie_name, Cookie Value: $cookie_value<BR>";
}
}
}
function mysetcookie($psName, $psValue, $psPath, $psDomain)
{
$sDate = date("r",strtotime("+1 minute"));
Header('Set-Cookie: '.$psName.'='.$psValue.'; expires='.$sDate.'; path='.$psPath.';"');
};