Skip to content

Commit

Permalink
updated readme to include a link to demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon1600 committed May 19, 2021
1 parent c2bdd10 commit f36c922
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Access it at:
http://your_server:60222/
```

## Preview
## Demo

http://us1.proxynova.net:60222/

![](https://cdn.proxynova.com/github/vnstat.png)

7 changes: 3 additions & 4 deletions vnstat.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

header("Content-Type: text/plain");
header("X-Robots-Tag: noindex");

exec("vnstat -w", $output, $return_var);
// Note that if the array already contains some elements, exec() will append to the end of the array.
exec("vnstat -d", $output, $return_var);

// http://tldp.org/LDP/abs/html/exitcodes.html
if ($return_var == 127) {
die("Error: vnstat not installed!");
}

// Note that if the array already contains some elements, exec() will append to the end of the array.
exec("vnstat -d", $output, $return_var);

echo implode("\r\n", $output);

0 comments on commit f36c922

Please sign in to comment.