$GET_DATE = $_GET['date'];
$file = file_get_contents('urllog');
preg_match_all('#(^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4})#m', $file, $matches);
foreach($matches[0] as $key => $date) $matches[$key] = strtotime($date);
$matches = array_unique($matches);
rsort($matches);
foreach($matches as $key => $date) $matches[$key] = date('n/j/Y', $date);
foreach($matches as $key => $date) {
printf("%d", $date, $key);
}
printf("
");
preg_match_all("#$GET_DATE (.*)#", $file, $date_match);
foreach($date_match[1] as $line) {
printf("%s
\n", $line);
}
?>