summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server-status-logger.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/server-status-logger.php b/server-status-logger.php
index b1fa4e2..3663f3c 100644
--- a/server-status-logger.php
+++ b/server-status-logger.php
@@ -1,8 +1,8 @@
#!/usr/bin/env php
-# file updated 20. may 2019, 22:00 from http://razor.arnes.si/~asija3/files/server-status-logger.php
+#file updated from http://razor.arnes.si/~asija3/files/server-status-logger.php at 29. may 2019 at 22:14
<?php
if(empty($argv[1])) {
- exit("server-status-logger.php v0.1 2019 Anton Šijanec astiril/server-status-logger\n
+ exit("server-status-logger.php v0.1 2019 Anton Ĺ ijanec astiril/server-status-logger\n
$argv[0] server-status-url [dbfile]\n");
}
if(empty($argv[2])) {
@@ -47,12 +47,13 @@ function tablefromhtml($urltoget) {
$i++;
}
$table[] = $row;
- return $table;
}
+ return $table;
}
class MyDB extends SQLite3 {
function __construct() {
+ global $dbfile;
$this->open($dbfile);
}
}
@@ -79,7 +80,9 @@ function tablefromhtml($urltoget) {
$countTable = $dbConnect->querySingle("SELECT COUNT(*) as count FROM ".$tablename."");
$countTable = true;
while($countTable) { // while true basically
+ echo "r";
$table = tablefromhtml($url);
+ // var_dump($table); // debug
end($table);
$lastkey = key($table);
for($i=1;$i <= $lastkey;$i++) {
@@ -106,9 +109,6 @@ while($countTable) { // while true basically
} else {
echo "x";
}
- } else {
- echo "whoops?\n";
- $dbConnect->lastErrorMsg();
}
}
}
@@ -119,7 +119,7 @@ while($countTable) { // while true basically
-function build_table($array){ // not needed, maybe for debugging
+function build_table($array){
// start table
$html = '<table>';
// header row