Forum Moderators: coopster
<?php$path = "/path/to/textfiles";
$getmonth = date("m");
$getday = date("d");
$month = isset($_GET["month"])? $_GET["month"] : "$getmonth";
$day = isset($_GET["day"])? $_GET["day"] : "$getday";
$textfile ="$path/history/$month/$day.dat";
$items = file("$textfile");
$item = rand(0, sizeof($items)-1);
echo $items[$item];
?>