Request, Block range of IPs, plus external solution.
Posted: Wed Jun 23, 2010 2:57 am
Hi,
I have the need to block ranges of IP addresses from posting in a particular instance of the gbook (aweseom product btw, well done). It was important to me that they still be able to view the guestbook.
As far as a feature request goes, it would be great is blocks could be specified as ranges in a form similar to the following;
10.0.0.0/255.255.255.0
10.0.0.0/24
10.0.0.0-10.0.0.255
In case anyone else has the ned for the same thing I'll briefly explain what I have done to get around this limitation;
made a copy of gbook.php, called it gbookPost.php
edited the sign_form.php template & modified the following line;
<form action="gbookPost.php" method="post">
...so that the only time this new php file is used is when submitting a new post.
Then in IIS I changed the file security for the new file gbookPost.php, to deny access to the desired IP ranges. This means that users can view the guestbook, but specified ranges of users get an "access denied" error when they try to submit a post.
Thanks
Matt
And one more time before I go... great job
I have the need to block ranges of IP addresses from posting in a particular instance of the gbook (aweseom product btw, well done). It was important to me that they still be able to view the guestbook.
As far as a feature request goes, it would be great is blocks could be specified as ranges in a form similar to the following;
10.0.0.0/255.255.255.0
10.0.0.0/24
10.0.0.0-10.0.0.255
In case anyone else has the ned for the same thing I'll briefly explain what I have done to get around this limitation;
made a copy of gbook.php, called it gbookPost.php
edited the sign_form.php template & modified the following line;
<form action="gbookPost.php" method="post">
...so that the only time this new php file is used is when submitting a new post.
Then in IIS I changed the file security for the new file gbookPost.php, to deny access to the desired IP ranges. This means that users can view the guestbook, but specified ranges of users get an "access denied" error when they try to submit a post.
Thanks
Matt
And one more time before I go... great job
