require('/home/httpd/html/circus/chart/chart.php');
$fp = fopen("/home/httpd/html/s/active", "r");
if (!$fp)
exit;
while (! feof($fp)) {
$line = fgets($fp, 1000);
list ($group, $articles) = explode(" ", $line);
$groups[$group] = $articles;
}
for ($year = 1997; $year < 2013; $year++) {
for ($week = 1; $week < 53; $week++) {
$date = date("Ymd", strtotime("${year}W$week"));
if ($date > 19700101) {
$data[] = $groups["sent.${year}w$week"];
$dates[] = $date;
}
}
}
$chart = new chart(sizeof($data) + 40, 400, "plotmail");
$chart->plot($data, false, "black", "impulse", false, 4);
$chart->set_x_ticks($dates);
$chart->stroke();