Page 1 of 1

GBook with IP logging

Posted: Tue Oct 11, 2005 10:41 pm
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

Posted: Tue Oct 11, 2005 11:05 pm
by FruitBeard
forgot to mention

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

Posted: Sat Oct 15, 2005 12:06 am
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! :)

Posted: Sun Oct 16, 2005 10:39 am
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/

Thanks!

Posted: Sun Jan 22, 2006 10:58 am
by DaDon
I know I'm a few months later coming back into the party but...thanks! 8)

OK for any version!

Posted: Sun Sep 17, 2006 1:53 pm
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!

IP Banning

Posted: Sat Jan 12, 2008 8:38 pm
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

Posted: Sat Sep 12, 2009 1:08 pm
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.