diff options
author | Anton Šijanec <sijanecantonluka@gmail.com> | 2019-05-20 22:15:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-20 22:15:18 +0200 |
commit | 8791be62cca96b0faa6b57ec1b3faab50d4f3175 (patch) | |
tree | 55c960943fac162ea4367cb7deb6a753aedb2236 /server-status-logger.php | |
parent | updated README.md (diff) | |
download | server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar.gz server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar.bz2 server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar.lz server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar.xz server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.tar.zst server-status-logger-8791be62cca96b0faa6b57ec1b3faab50d4f3175.zip |
Diffstat (limited to '')
-rw-r--r-- | server-status-logger.php | 14 |
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 |