J E E - R A H L
$delim = "\n"; $quotefile = "quotes.txt"; $fp = fopen($quotefile, "r"); $contents = fread($fp, filesize($quotefile)); $quote_arr = explode($delim,$contents); fclose($fp); // generate random quote index $quote_index = (mt_rand(1, sizeof($quote_arr)) - 1); // get quote at $quote_index and return it $herequote = $quote_arr[$quote_index]; echo $herequote; ?>
« Circus
|
Main
|
Conspiracy? »
September 13, 2006
Fortune
Fortune cookie of the day: "Three times a week, treat yourself to dessert."
Posted by e1000 at September 13, 2006 02:52 PM
Comments
Post a comment
Name:
Email Address:
URL:
Remember personal info?
Yes
No
Comments: