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