You are here: Re: Get values for ALL cookies? « PHP Programming Language « IT news, forums, messages
Re: Get values for ALL cookies?

Posted by Zoe Brown on 10/23/77 11:26

"Adam" <anon@nowhere.com> wrote in message
news:4qtai1t10uqmm3n8v5ul18igq3qniuvfi0@4ax.com...
> On Mon, 12 Sep 2005 11:40:18 GMT, Zoe Brown wrote:
>
>>
>>"Adam" <anon@nowhere.com> wrote in message
>>news:m2mai1lr4koupa228ahnil5utndtrc0lhv@4ax.com...
>>> On Mon, 12 Sep 2005 10:08:29 +0300, Alexey Kulentsov wrote:
>>>
>>>>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.
>>>
>>> I was trying to avoiid touching the current database, but I'll add a
>>> table if I really have to.
>>>
>>>>You can also parse session files in /tmp directory instead of making
>>>>database-driven handler but I don't think it's good way.
>>>
>>> Nope - it's on a hosted server anyway, so I wouldn't get access to the
>>> /tmp directory.
>>>
>>> I guess I'm being lazy, as I thought I could just read the cookies
>>> (as they're set to timeout after an hour).
>>
>>read the cookies with what ?
>
> Exactly!! I don't know! As is apparent, I don't know much about
> cookies - other than I thought they were also stored on the server ...
> and therefore [somehow] accessible.
>
> Of course, it's highly probable that I'm barking up the wrong tree -
> and should read up on session management.

wrong tree, they are stored on the clients machine...

>
> Adam.

 

Navigation:

[Reply to this 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

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