Thanks Brian, I should have provided that detail. Unfortunately it is on a
Windows machine.. anyone know of a schedule for IIS that would do the same
thing?
Rudy
----- Original Message -----
From: "Brian Clark" <[EMAIL PROTECTED]>
To: "PHP is not a drug ." <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 3:56 AM
Subject: Re: [PHP] question on time-based function
>
> Hello Rudy,
>
> (RM == "Rudy McDaniel") [EMAIL PROTECTED] writes:
>
> RM> Anyone have any ideas on how to make a function reset every
> RM> 24-hours? For example, I have a function that grabs a random quote
> RM> from a file and selects a new one every time the page is reloaded.
> RM> What I want, however, is for the quote to remain the same for a
> RM> day and then reset at some specified time (say midnight) and grab
> RM> a new random quote for the next day. It seems like their should be
> RM> any easy way to do this using mktime( ) or a similar function but
> RM> I'm not fully grasping it. Any ideas on how to do this would be
> RM> much appreciated.
>
> Why not just make cron (once a day) read the quotes file, pick a
> random line, write the quote to a file called quoteoftheday.php, then
> just include() that file into your page?
>
> Unless you're running this one a windows machine.. in that case you
> might be able to do the same thing with some scheduler instead of
> cron, I'm not sure.
>
> -Brian
> --
> Opportunity makes a thief. -Francis Bacon, 1598
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]