Reply to Re: How to kill all active sessions?

Your name:

Reply:


Posted by Erwin Moller on 09/10/07 09:23

Ming wrote:
> Hi all,
>
> I wonder if there is a way to kill all active sessions.
>
> Basically, I want to have a page, for example, foo.php. Whenever users
> visit this page, regardless of where they come from, all sessions that
> are from my site will be destroyed.
>
> Thanks,
>

Hi Ming,

Under normal circumstances you have only 1 PHP session belonging to 1
client.

It is not clear to me what you excactly asking.

Did you create multiple session for 1 user?
(Using different sessionnames)

Or do you have a few subdomains that share the same cookie and thus session?

Or do you want to destroy ALL sessions belonging to all the different
visitors? (If so follow Ricks advise, unless you are on a shared host)

In case you just want to empty the current session:
$_SESSION = array();
will do the trick. It will empty the current session (Not destroy it).

Please elaborate a little more on your current setup/task, so we can
give you to-the-point answers (maybe).

Regards,
Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация