Reply to Re: Get values for ALL cookies?

Your name:

Reply:


Posted by Alexey Kulentsov on 11/11/09 11:26

Adam wrote:
> I'm trying to track who's logged into a site (without setting flags in
> the databses).
In php script you have cookies for only current user so you can't do
it without database (SQL or text - doesn't matter)

> At the moment, each user gets a cookie with "Usr_Name" set if
> authentication goes through OK.
>
> Is there a way of looping through ALL the values of a particular
> cookie, eg $_COOKIE['Usr_Name'] ... that would give me an output of
> (say):
>
> Fred
> Doris
> Bert
> etc.

1. Use session for logging users
2. Make database-driven session handler
3. Now you can get list of users by regular SQL query.

You can also parse session files in /tmp directory instead of making
database-driven handler but I don't think it's good way.

[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

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