PDA

View Full Version : Time Cookie


Zippo
1-9-02, 10:10 PM
Hi,

I have a section especially for members to let them add events or change their profile.

After login I put some data (name + id) in a cookie, which other webpages calls upon.

I would like to expire that cookie in half an hour.

Because my website is Dutch orientated (GMT+1) and the SQL server is in the USA (GMT+7, 6 hour difference) the cookie is expired before anybody can do anything.

Of course I can make the timeout time 6 hours longer, but I do not find that a 'nice' solution. (Also regarding summer/winter time) I rather would like to make a more universal solution that wherever you are in the world the cookie would expire after a half hour.

Who has an solution for me?

webpsico
1-13-02, 09:46 PM
Hoi zippo,

Voor zover ik weet haalt een cookie de tijd uit de machine van de bezoeker en maakt het niet uit waar je vandaan (tijdzone) komt.
Ik maak gebruik van diverse scripts die via Powweb's servers draaien en het tijdsverschil van 9 uur is niet van invloed...De cookies vervallen keurig op tijd...

As far as I know checks a cookie the local time on the system of the visitor of your page and should there be no problem with the 9 hours time difference between California and The Netherlands...

;-) Jaap

Zippo
1-13-02, 11:37 PM
I am sorry, but you are wrong.

{
$geslaagd = "J"; // Zoja, log verder in
$var_cookie = base64_encode($id);
SetCookie("concert", $var_cookie, time() + 1800);
$cookie2 = base64_encode("artiest");
SetCookie("concert_soort", $cookie2, time() + 1800);
if ($password == "test")
header("location:wijzig_ww.php");
else
header ("location:leden.html");
}


This does not work on the powweb server and it does work on a dutch server.
(Let's keep it here in English, ok?)

Zippo

jtucker135
1-18-02, 10:20 PM
I'm hoping this can be solved by turning on output buffering in the PHP.ini file. This looks like a perfect example of an error caused by output buffering being off in CGI-PHP.

Zippo
1-18-02, 10:26 PM
Would be nice if somebody from inside powweb could give an answer about that.

jtucker135
1-19-02, 12:06 AM
I was told by an admin that you can fix the php.ini yourself. anyone know how to do this?