PHP script to show squidguard messages, anyone?
-
I'm not in any way a PHP programmer, so I'm asking all you wiz's ;D
I would like to have squidguard to redirect to an extended url, like:
intranet/forbudt.php?page=%u&group=%tand then have the variables shown on my webpage.
Now, I have tinkered the PHP code that will display the variables (a lot of work for a nonprogrammer ;)).
$page = $_GET['page'];
$group = $_GET['group'];echo "URL: $page found in the group $group";
?>And I have a HTML page, question is though, how do I combine them, can I embed PHP on a webpage or what?
<title>FORBIDDEN</title>
<big><big><big>FORBUDT</big></big></big>
The page
you are trying to visthas been banned.
If you think this is an error
contact webmaster.
???
-
Heh, got it sorted (always helps with a bit of sleep).
I had found a page that explained that it could be embedded, but it didn't work.
What I hadn't considered was to change the extension to PHP, as soon as I did that, it worked like a charm.So now I have my simple page that says forbidden, and even gives a reason for it :-)
-
Where did you put your page to? Is it running on the pfsense box?
-
Where did you put your page to? Is it running on the pfsense box?
I have my website hosted on my NAS box (QNAP), and I've made a virtualhost just for this purpose, it works like a charm!
Then I just redirect to that host with the arguments I want to show on the page.