All pastes #84330 Raw Edit

Miscellany

public php v1 · immutable
·published 2006-07-10 20:39 UTC
rendered paste body
<html><head></head><body><?        $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("<a href=?date=%s>%d</a>", $date, $key);        }        printf("<br/>");        preg_match_all("#$GET_DATE (.*)#", $file, $date_match);        foreach($date_match[1] as $line) {                printf("%s<br/>\n", $line);        }?></body></html>