Re: Storing values in arrays
| From: | Robert Cummings | Date: | Wed, 17 Jan 2007 10:59:32 +0000 |
| Subject: | Re: Storing values in arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247204@lists.php.net to get a copy of this message | ||
On Wed, 2007-01-17 at 02:40 -0800, Ryan A wrote:
>
>
> Robert Cummings <robert@interjinn.com> wrote:
> On Wed, 2007-01-17 at 00:35 -0800, Ryan A wrote:
> > Hi,
> >
> > I think its easier to explain what I want to do.. so here
> goes:
> > I want to store values in arrays for one minute and then
> write them to file.
> >
> > For example, everytime someone logs in I want their username
> to be in an array....
> > 1 or 100 or X people may login in 60 seconds...but it should
> only write all the usernames that logged in to disk every 1
> minute.
> >
> > Ideas? suggestions? starting points or a link to a specific
> spot in the manual with a RTFM would be appreciated :)
>
> Might be able to do it with shared memory and a cron job. I'm
> just not
> sure if shared memory works between web module and cli. If
> not, I guess
> you could use wget in the cron job to pull a special page from
> your
> website that does the write.
>
> Cheers,
> Rob.
>
> Hey!
> Thanks for replying.
>
> Instead of CRON i was thinking of having a file created and check the
> creation time everytime someone logged in... if its less than 1 min
> then don't do anything, if 1 min or more old... write file...
But then it wouldn't be written to disk every one minute if someone
didn't log in for 3 minutes ;)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'