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
Block Email
-
- Posts: 38
- Joined: Thu Jul 21, 2005 6:25 pm
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
and place beneath it this code
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
line 57 with gbook 1.35printTopHTML();
and place beneath it this code
then place this in your settings.php file somewhere$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 !!!');}
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/
http://www.fgps.com/keith/
Question: Can you add more names if the person changes his/her email address.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
line 57 with gbook 1.35printTopHTML();
and place beneath it this code
then place this in your settings.php file somewhere$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 !!!');}
Worked/ works for me and theres only 3 lines to add to gbook itself, not too much to fuss about.
-
- Posts: 38
- Joined: Thu Jul 21, 2005 6:25 pm
Of course you can,
$settings['CHECKMAIL'] = array(
'antony@gmail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
);
$settings['CHECKMAIL'] = array(
'antony@gmail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
);
FruitFully yours
http://www.fgps.com/keith/
http://www.fgps.com/keith/
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..FruitBeard wrote:Of course you can,
$settings['CHECKMAIL'] = array(
'antony@gmail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
'anotherbaddy@whatevermail.com',
);
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
Ban single or ranges quickly with this.
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>
<?
}
}
?>
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>
<?
}
}
?>
Error Message
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']))
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']))