Go Back!

'$filepath'"); shell_exec("cat /var/log/captiveportalauth.log | grep -i -a '$username' | awk '{print $10}' | sort | uniq > '$filepath'"); //Creates a log based off the 10000 lines of browsing history of the IP addresses returned above shell_exec("cat /var/squid/logs/access.log | grep -a -i -f '$filepath' | tail -n 10000 > '$filepath2'"); //Deletes the list of IP addresses shell_exec("rm '$filepath'"); //Creates a download link of the log, points to another PHP script that forces the download, instead of trying to show a huge log in the browser. echo "

Download the log for $username here

"; //Shows the log in an iFrame echo ""; //Deletes the log after waiting 1 minute //1 Minute wait is to make sure the client has downloaded the log in time. //shell_exec("sleep 60; rm '$filepath2'"); ?>