Code: Select all
<?php
exec ("/usr/games/fortune", $fortuneArray);
reset($fortuneArray);
while (list ($key, $val) = each ($fortuneArray))
{
$fortune .= "<br>\n" . trim($val);
}
echo $fortune;
?>I was so happy to get this to work....I had to share it.