diff --git a/templates/adblock.php b/templates/adblock.php
index d1c6afd2..b14a268f 100755
--- a/templates/adblock.php
+++ b/templates/adblock.php
@@ -2,9 +2,9 @@
">
- ">
-
">
+
+ ">
@@ -32,7 +32,7 @@
@@ -82,7 +82,20 @@
';
+ $log = '';
+ exec('sudo chmod o+r /tmp/dnsmasq.log');
+ $handle = fopen("/tmp/dnsmasq.log", "r");
+ if ($handle) {
+ while (($line = fgets($handle)) !== false) {
+ if (preg_match('/(0.0.0.0)/', $line)){
+ $log.=$line;
+ }
+ }
+ } else {
+ $log = "Unable to open log file";
+ }
+ fclose($handle);
+ echo '';
?>