Re: Storing values in arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-01-17 at 02:40 -0800, Ryan A wrote:
> 
> 
> Robert Cummings <robert@xxxxxxxxxxxxx> 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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux