Jump to content

Excessive Spamming


rpalmer800

Recommended Posts

Hi, Within the past few days we have received about 35 spam applications including 6 in the past hour. I don't think that they are being manually entered because i keep blocking the IP's and we really haven't made any enemy's i really have tried everything i know to stop them, tried google and everything, but nothing seems to be working... so i was wondering if anybody has any solutions, like anti spam scripts or anything.

Link to comment
Share on other sites

  • Administrators

I added some code to the registration module and it cuts down the spam signups dramatically, not 100% but close. It querys the stop forum spam database both for the email and the ip.

In registration.php - function ProcessRegistration() - right after

'hub' => $this->post->hub,
'confirm' => false
);

make some room and add this

// Check email for known spammer
					 $url = 'http://www.stopforumspam.com/api?email='.$data['email'].'&ip='.$_SERVER['REMOTE_ADDR'];
					 $file = new CodonWebService();
					 $contents = $file->get($url);
					 $response = simplexml_load_string($contents);
					 $reject = FALSE;
					 foreach($response->appears as $row)
					 {
						 if($row == 'yes'){$reject = TRUE;}
					 }
					 if($reject == TRUE){
							 $this->set('message', 'Your email or IP address appears on our spam database, we therefore assume
								 you are a spammer and are rejecting your registration request. If you feel this is incorrect please contact us.');
							 $this->render('core_error.tpl');
							 //send email that spam registration rejected
							 $email = 'put your email address here';
							 $sub = 'Spam Registration Rejected';;
							 $message = 'Spam pilot registration rejected using email '.$data['email'].' and
								 IP address '.$_SERVER['REMOTE_ADDR'].' on '.date('m/d/Y', time()).' at '.date('g:ia', time());
							 Util::SendEmail($email, $sub, $message);
					 return false;
					 }
				 //end spam check

replace the - put your email address here - with the email you want the notice that a rejection has occured sent to.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...