Request, Block range of IPs, plus external solution.

Everything related to GBook PHP guestbook
Post Reply
bernieL0max
Posts: 1
Joined: Wed Jun 23, 2010 2:36 am

Request, Block range of IPs, plus external solution.

Post by bernieL0max »

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 :)
Klemen
Site Admin
Posts: 10114
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for the suggestion, but blocking ranges of IPs is far more effective (and faster) on the server-side so I'm not sure such a feature will be added.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply