<?php
if ($_GET["pass"] == "simplepass") {
shell_exec('echo www-data-password | sudo -S /usr/bin/phphalt');
echo "Shutdown...please wait";
} else echo "wrong password";
?>