|
This is the
Cortroom.com
A
website that I have put together about myself, who I am and what I do!
Hope you enjoy!
I am starting a new
revamped website for the Cortroom very soon!
"Never
give in--never, never, never, never, in nothing great or small,
large or petty, never give in except to convictions of honour and
good sense. Never yield to force; never yield to the apparently
overwhelming might of the enemy."
Sir Winston Churchill |
// Quick random quote
// This script reads a quote file (flat text file), and picks one of the loaded
// quotes at random and displays it.
// Line breaks and formatting can be put into the quotefile as HTML tags
// Place the quotes.txt on your site, edit the $quotefile variable below,
// And copy and paste this code into your PHP page.
// $delim tells this script what delimits the quotes (default is a CR/LF)
$delim = "\n";
// $wuotefile points to the file that holds the actual quotes
$quotefile = "quotes.txt";
$fp = fopen($quotefile, "r");
$contents = fread($fp, filesize($quotefile));
$quote_arr = explode($delim,$contents);
fclose($fp);
srand((double)microtime()*1000000);
$quote_index = (rand(1, sizeof($quote_arr)) - 1);
$herequote = $quote_arr[$quote_index];
echo $herequote;
?>
Design
and Content © Ian M Cort 2009
|