Old School
So say you want to add a random selection for a database to a page, but you don’t really to add the overhead of making the page dynamic? Say perhaps you want to add this feature in about 10 minutes, and your ideas about building a system to cache, and rotate the item seems like overkill?
I’m thinking, “Hmmm, thats sounds find of like what fortune
does…”. So quick Perl script pull items out of database, and spit out the raw fortune file, print "$item\n%\n";
. Dig through the man pages, and find that you need to run your new quotes file through strfile
to fortune enable it. And how you integrate it with a bit of SSI.
\<!--#exec cmd="/usr/games/fortunes /var/www/myfortunes" -->