8
|
1 |
<?php
|
|
2 |
header('Content-type: application/force-download');
|
20
|
3 |
header('Content-disposition: attachment; filename=stats-data.csv');
|
|
4 |
|
|
5 |
require('../stats-fe.php');
|
|
6 |
|
|
7 |
echo "channel,nick,timestamp\n";
|
8
|
8 |
|
20
|
9 |
$q = eb_mysql_query('SELECT channel, nick, time FROM stats_messages ORDER BY message_id ASC;');
|
8
|
10 |
|
20
|
11 |
while ( $row = mysql_fetch_assoc($q) )
|
|
12 |
{
|
|
13 |
echo "{$row['channel']},{$row['nick']},{$row['time']}\n";
|
|
14 |
}
|
|
15 |
|
|
16 |
mysql_free_result($q);
|