Page 1 of 1

Block Email

Posted: Sat Mar 25, 2006 5:55 pm
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

Posted: Sat Mar 25, 2006 6:55 pm
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

Posted: Sun Mar 26, 2006 6:32 am
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.

SPAM

Posted: Sun Mar 26, 2006 4:58 pm
by lasseg
Thank yoU!
I have ecately the same problem :-)

Posted: Wed Mar 29, 2006 5:19 pm
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.

Posted: Wed Mar 29, 2006 5:54 pm
by FruitBeard

Posted: Wed Mar 29, 2006 6:07 pm
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

Posted: Fri Mar 31, 2006 3:28 pm
by lorebett
just tried and it works like a charm, thanks! :D

Ban single or ranges quickly with this.

Posted: Fri Mar 31, 2006 9:16 pm
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>


<?
}
}
?>

Posted: Sat Apr 01, 2006 1:33 am
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

Error Message

Posted: Sun Apr 02, 2006 12:07 am
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']))