Block Email

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Zeus
Posts: 2
Joined: Sat Mar 25, 2006 5:48 pm

Block Email

Post by Zeus »

Hi All.

I have a spam problem.

It's always the same email that is used for signing up in my guestbook antony@gmail.com is it possible to block this e-mail so the messaged is deleted automatically.

Greetings Rasmus
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Rasmus,

No, this is not possible.
At least not without modifying the gbook code.

And I can't help you with modifying the code because I don't know how it should be changed.

Greetings,
Henrie
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Post by FruitBeard »

Hi there,

I had the same problem with my tester gbook, but the culprit, i.e antony@gmail.com has now vanished.

to do it,

find inside gbokk.php this code
printTopHTML();
line 57 with gbook 1.35

and place beneath it this code
$BADMAIL=($_REQUEST['email']);
if (in_array($BADMAIL,$settings['CHECKMAIL']))
{problem('This IP has been prevented from signing this Guest Book. Or whatever you like here instead !!!');}
then place this in your settings.php file somewhere
$settings['CHECKMAIL'] = array(
'antony@gmail.com',
'anotherbaddy@whatevermail.com',
);
Worked/ works for me and theres only 3 lines to add to gbook itself, not too much to fuss about.
FruitFully yours

http://www.fgps.com/keith/
lasseg
Posts: 1
Joined: Sun Mar 26, 2006 4:49 pm

SPAM

Post by lasseg »

Thank yoU!
I have ecately the same problem :-)
Junefly
Posts: 20
Joined: Mon Jan 16, 2006 7:33 pm

Post by Junefly »

FruitBeard wrote:Hi there,

I had the same problem with my tester gbook, but the culprit, i.e antony@gmail.com has now vanished.

to do it,

find inside gbokk.php this code
printTopHTML();
line 57 with gbook 1.35

and place beneath it this code
$BADMAIL=($_REQUEST['email']);
if (in_array($BADMAIL,$settings['CHECKMAIL']))
{problem('This IP has been prevented from signing this Guest Book. Or whatever you like here instead !!!');}
then place this in your settings.php file somewhere
$settings['CHECKMAIL'] = array(
'antony@gmail.com',
'anotherbaddy@whatevermail.com',
);
Worked/ works for me and theres only 3 lines to add to gbook itself, not too much to fuss about.
Question: Can you add more names if the person changes his/her email address.
Junefly
Posts: 20
Joined: Mon Jan 16, 2006 7:33 pm

Post by Junefly »

I answered this and hit a emoticon and was sent back to the forum, so I don't know if the answer was accepted.. I am sorry for the double post is this is the case..

I thank you very much!!! It works!!!!!

The person I have doing this is an AOL dial up and blocking ips does not work well as they change daily..

Junefly
http://www.rampbbs.net
lorebett
Posts: 6
Joined: Fri Mar 31, 2006 8:26 am

Post by lorebett »

just tried and it works like a charm, thanks! :D
dant1259
Posts: 1
Joined: Fri Mar 31, 2006 9:03 pm

Ban single or ranges quickly with this.

Post by dant1259 »

This will email you the spammers ip address and then you can ban by single ip or by range.


I have set up 2 parts. 1 part is in gbookphp

at the top of the script above:
error_reporting(E_ALL ^ E_NOTICE);

I added:
$ipaddr = $_SERVER["REMOTE_ADDR"];

*****----------------------------------------------------------------*****
I modified the notification portion as follows(around line 460):
*****--------------------------------------------------------------******

if ($settings['notify'] == 1)
{
$ipaddr = $_SERVER["REMOTE_ADDR"];
$char = array('.','@');
$repl = array(".","@");
$email=str_replace($repl,$char,$email);
$message = "Hello!

Someone has just signed your guestbook!

Name: $name
From: $from
E-mail: $email
Website: $url
IP Address: $ipaddr

****------------------------------------------------------------------****
that will send the ip address in the notification email.

in the header.txt file I changed as follows:
****------------------------------------------------------------------*****

<html>
<?php


$timedate = date("F j, Y, g:i a");
$usr = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
$ipaddr = $_SERVER["REMOTE_ADDR"];






$range = array('0'=>'172.201.32.26',
'1'=>'81.177.15'
);

foreach($range as $list){
if(strstr($_SERVER['REMOTE_ADDR'], $list)){

?>

***-----PLACE ANY HATE SPAM OR BANNED HTML HERE!!!----*****

<?
die;

}
else
{
?>


-----*****BELOW IS MY CUSTOM PAGE, PLEASE USE YOURS OR YOU WILL GET A PINK / PURPLE PAGE. PLEASE USE YOUR HEADER INFO -----*****

<head><title>Welcome to Guestbook</title></head>
<body bgcolor="#555555" link="blue" vlink="blue" alink="red" topmargin="0" marginheight="0" style="font-family:verdana" background="http://yourwebsite.com/images1/bkgr.jpg">
<center>
<br><br>
</center>
</body>
</html>


<?
}
}
?>
ajd344
Posts: 3
Joined: Sat Apr 01, 2006 1:31 am

Post by ajd344 »

Exact same problem. Followed the advice. Everything looks good! Maybe on any future versions, if any, the author could automaticlly black out this email.

Thanks
herb
Posts: 1
Joined: Sat Apr 01, 2006 11:59 pm

Error Message

Post by herb »

I'm having the same problem with this antony@gmail.com and am happy to find others who have dealt with him. I applied the two updates to the gbook.php and settings.php pages. I'm almost there, but I'm receiving an error message shown below. If anyone can help that would be awesome. This antony thing is the scurge from h*ll and has been poluting my guestbook for some time. Thanks!

Herb

Warning: in_array(): Wrong datatype for second argument in /homepages/12/d135221597/htdocs/ttlgallery/guestbook/gbook.php on line 60

This is what appears on line 60:
if (in_array($BADMAIL,$settings['CHECKMAIL']))
Post Reply