View Single Post
Old 01-04-2006, 12:07 PM  
donnie
Confirmed User
 
Join Date: Jan 2003
Posts: 1,630
Quote:
Originally Posted by Evil1
I suggest php, 10 lines of code and a text file and you are all set.
<?
$delim = "\n";
$cryfile = "filename.txt";
$fp = fopen($cryfile, "r");
$contents = fread($fp, filesize($cryfile));
$cry_arr = explode($delim,$contents);
fclose($fp);
srand((double)microtime()*1000000);
$cry_index = (rand(1, sizeof($cry_arr)) - 1);
$herecry = $cry_arr[$cry_index];
echo $herecry;
?>

That will do it
donnie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote