GBook with IP logging

Everything related to GBook PHP guestbook
Post Reply
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

GBook with IP logging

Post by FruitBeard »

Script URL: http://www.fgps.com/keith/
Version of script: 1.33
Version of PHP: 4.3.11
Hosting company: N/A
Have you searched THIS FORUM for your problem: N/A
(if not please do before posting)
If so, what terms did you try: N/A

Write your message below:

Hi there,

Have made a couple of modification to GBook

Now includes IP Logging( shown underneath Email) and sends IP with email reply.(Email also shows who sent it, rather than cgi mailer)

link to view
http://www.fgps.com/keith/GBook/gbook.php

link to get
http://www.fgps.com/keith/GBook.zip
FruitFully yours

http://www.fgps.com/keith/
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Post by FruitBeard »

forgot to mention

and options to ban ip addresses, using the settings.php file
FruitFully yours

http://www.fgps.com/keith/
DaDon
Posts: 3
Joined: Sat Oct 15, 2005 12:00 am

Post by DaDon »

The ip address capture/display, etc. is a great idea! FruitBeard have you done a version for the mySQL version of gBook? If not can you consider this option cos it would help others like myself! :)
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Post by FruitBeard »

there you go,

not sure if it works or not as i dont use a mysql database at present (but shall do so

you will have to let me know if it works, as i have added all the necessary extras.

:roll:

http://www.fgps.com/keith/gbooksqlip.zip



http://www.fgps.com/keith/
FruitFully yours

http://www.fgps.com/keith/
DaDon
Posts: 3
Joined: Sat Oct 15, 2005 12:00 am

Thanks!

Post by DaDon »

I know I'm a few months later coming back into the party but...thanks! 8)
Cheepnis
Posts: 5
Joined: Tue Jul 25, 2006 2:21 pm

OK for any version!

Post by Cheepnis »

I simply wanted the IP blocking function in order to prevent hecklers and trolls (since they don't get captured as spam) and borrowed the snippets from this mod (THANKS FruitBeard!)


IN GBOOK.PHP near the top of the file,
Replace this:
printTopHTML();

if (!(empty($a))) {
with this:
printTopHTML();

$IP=gbook_input($_SERVER['REMOTE_ADDR']);
$CHECKBAN =1;
foreach ($settings['CHECKIP'] as $BANLIST)
{if (preg_match("/$BANLIST/i",$IP))
{$CHECKBAN=0; break; } }
if (!$CHECKBAN)
{problem('Your IP has been banned');}

if (!(empty($a))) {

IN SETTINGS.PHP

Add the following as the first setting in the file:
/* add ip addresses if you wish to ban any,keep the same format for all. 127.0.0.1 is your localhost for testing purposes. */
$settings['CHECKIP'] = array('65.93.55.98','127.0.0.1');
That's all there is to it!
Visit www.MST3K.org for the BEST cheesy movies on this planet!
bill44will
Posts: 1
Joined: Mon Jan 07, 2008 4:06 pm

IP Banning

Post by bill44will »

Keith,
I have tried to download your ZIP files, but they always come up empty? I sure would like to see that GBook you made using MySQL.

Bill Williams
billw@iname.com
tompatterson
Posts: 1
Joined: Sat Sep 12, 2009 12:57 pm

Post by tompatterson »

Is it possible to manually ban a range of IP addresses rather than just a single IP address within the banned_ip.txt file? I am receiving a number of junk postings, but banning the single ip address from which they originate does not solve the problem, because they apparently are coming from someone who has a dynamic rather than static address.

If I could ban messages from the server from which these posting arise, I could solve the problem. I have successfully solved this problem on my phpBB forums by banning ranges.
Post Reply