aboutsummaryrefslogtreecommitdiffstats
path: root/csv.php
diff options
context:
space:
mode:
authorMatt Rude <[email protected]>2011-06-25 19:27:08 -0500
committerMatt Rude <[email protected]>2011-06-25 19:27:08 -0500
commit578df65b19beb708c24e31ffead44f3afe27b0c1 (patch)
tree8aab4e154a51d7da9f896e4d136fe9d601d4c8d8 /csv.php
parent83c1c666ced9c64d9be7a1e9e6417dfb1db6f1bf (diff)
downloadtime.mattrude.com-578df65b19beb708c24e31ffead44f3afe27b0c1.tar.gz
time.mattrude.com-578df65b19beb708c24e31ffead44f3afe27b0c1.tar.bz2
time.mattrude.com-578df65b19beb708c24e31ffead44f3afe27b0c1.zip
move csv.php into the bin directory
Diffstat (limited to 'csv.php')
-rw-r--r--csv.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/csv.php b/csv.php
deleted file mode 100644
index 0b75627..0000000
--- a/csv.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-if (!isset($_REQUEST['host']))
- {
- $_REQUEST['host'] = '%';
- }
-$host = $_REQUEST['host'];
-
-try{
-$dbHandle = new PDO("sqlite:rrd/ntpstatus.sqlite");
-}catch( PDOException $exception ){
- echo "Can NOT connect to sqlite3 database ntpstatus.sqlite";
- die($exception->getMessage());
-}
-
-$sqlShowLog = "SELECT * FROM status WHERE host LIKE '${host}';";
-$result = $dbHandle->query($sqlShowLog);
-echo nl2br("date,host,offset,freq,sjit,cjit,wander,disp,jitter\n");
-while ($entry = $result->fetch()) {
- $date = $entry['date'];
- $host = $entry['host'];
- $offset = $entry['offset'];
- $freq = $entry['freq'];
- $sjit = $entry['sjit'];
- $cjit = $entry['cjit'];
- $wander = $entry['wander'];
- $disp = $entry['disp'];
- $output = "$date, $host, $offset, $freq, $sjit, $cjit, $wander, $disp, 0\n";
- echo nl2br($output);
-}
-
-?>