Jump to content

[SOLVED] Quote of the Day


Bricktop

Recommended Posts

Hi all,

 

Not sure if this is possible without using CRON (which I don't want to do)  but just thought I would get your opinion.

 

I have a script which displays a random line from a text file every time the page is loaded, it's quite simple code which reads in the text file, explodes the contents and then uses the rand() function to display a random quote.

 

Is there any way I can change the above so it only outputs a quote once per day?  Either using an if statement based on the date/time or another PHP-only method?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/177172-solved-quote-of-the-day/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.