Oh, i know now that user can stop cookies. must much learn from here :).
but with this
setcookie("user", "Alex Porter", time()+3600);
i think you can set the cookies "closed" count down.
But your problem is just want to write,when user left the site,
maybe you must combine it with AJAX.
the logic is..
(copy from side forum)
==...What you should do is have a last_active field in your database
and have a query to run and check last_active times.If the time
is greater that 15 mins then run an update script to logout those users.==
Pete <[EMAIL PROTECTED]> wrote: In message <[EMAIL
PROTECTED]>, HardyBoyz
<[EMAIL PROTECTED]> writes
>pratimadongare <[EMAIL PROTECTED]> wrote: hi
>ppl,
>
> I am working on the session mgmt part in php.But could not find how to
> detect the closure of a session.
>I think you better using cookies, not session. find the tutorial here
>http://www.w3schools.com/php/php_cookies.asp
Why do you say that?
I have just changed a site from cookies to sessions because
a) users can stop cookies from working, they can't stop sessions from
working.
b) search engines don't seem to accept cookies. Certainly slurp had
difficulty in this area.
Also, a cookie is never "closed", so how can you tell when a user has
left the site?
--
Pete Clark
Sunny Andalucia
http://hotcosta.com/Andalucia.Spain
Jualan Hosting
www.magnet-id.com
Jualan Bandwith
www.lintaswave.net.id
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]