author | Dan |
Thu, 04 Dec 2008 19:40:27 -0500 | |
changeset 29 | 300f673fbbdc |
parent 20 | e2f6e3af9959 |
permissions | -rw-r--r-- |
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); |