XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author:

Stop Forum Spam integration for XMB

John Brown
New Poster
**




Posts: 1
Registered: 8-28-2012
Member Is Offline


[*] posted on 8-31-2012 at 01:46 PM
Stop Forum Spam integration for XMB


I joined the other forum, before realizing it was spam central.

I responded to this thread over there: http://www.xmbforum.com/viewthread.php?tid=776812

Basically, I was wondering if anyone knows if Stop Forum Spam integration is being considered?

Stop Forum Spam uses community generated info to track known forum spammers. This info is availabe via API call.

There are modules for other forum platforms that query this API during registration and deny registration if any or some of the information matches the registrant (functionality differs between the modules)

I am using ZB Block now, but it doesn't query the SFS API more often than every 24h, so some known spammers are able to register.

Just wondering :)

Code:
ZB Block: http://spambotsecurity.com/ SFS: http://www.stopforumspam.com
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 357
Registered: 6-3-2002
Location: Competitions Australia: https://www.lottos.com.au/
Member Is Offline

Mood: pass me a TimTam

[*] posted on 9-7-2012 at 11:07 AM


Assuming SimpleXML libraries have been loaded into php...

In member.php look for

$password = md5($password);


and insert the code below

Code:
// start of Stop Forum Spam code for xmb forum // updates will be on this topic: http://forums.xmbforum2.com/viewthread.php?tid=776782 // based on code examples: http://www.stopforumspam.com/forum/viewtopic.php?id=1973 // // if email address OR ip exist on stopforumspam website, user registration stops function objectsIntoArray($arrObjData, $arrSkipIndices = array()) { $arrData = array(); // if input is object, convert into array if (is_object($arrObjData)) { $arrObjData = get_object_vars($arrObjData); } if (is_array($arrObjData)) { foreach ($arrObjData as $index => $value) { if (is_object($value) || is_array($value)) { $value = objectsIntoArray($value, $arrSkipIndices); } if (in_array($index, $arrSkipIndices)) { continue; } $arrData[$index] = $value; } } return $arrData; } // uncomment and change email address below if you want notification of blocked spammers // mail("youremail@youremail.com","New Spammer Registration Attempt",$email); $xmlUrl = "http://www.stopforumspam.com/api?username=$username&ip=$onlineip&email=$email&f=xmldom"; //$xmlUrl = "http://www.stopforumspam.com/api?username=".$data['username']."&ip=$verifip&email=".$data['email']."&f=xmldom"; $xmlStr = file_get_contents($xmlUrl); $xmlObj = simplexml_load_string($xmlStr); $arrXml = objectsIntoArray($xmlObj); $checkemail = $arrXml[email][appears]; $checkip = $arrXml[ip][appears]; if ($checkemail > 0 || $checkip > 0) { // header('Location: http://www.xmbforum2.com/'); // web address redirection error('Go away SPAMMER'); //exit; } // end of inserted StopForumSpam code




Largest list of competitions online!
View user's profile Visit user's homepage View All Posts By User
solbu
Member
***




Posts: 33
Registered: 1-10-2007
Location: Norway
Member Is Offline

Mood: No Mood

[*] posted on 2-26-2013 at 04:47 AM


Quote: Originally posted by lottos  
Assuming SimpleXML libraries have been loaded into php...
How do we tell, and what do we do on a Debian server to enable it?

Google is of No help.:(
I can't find a single example anywhere on how to enable it.




My posts are licensed under a Creative Commons license
View user's profile Visit user's homepage View All Posts By User
lottos
Administrator
********




Posts: 357
Registered: 6-3-2002
Location: Competitions Australia: https://www.lottos.com.au/
Member Is Offline

Mood: pass me a TimTam

[*] posted on 2-26-2013 at 12:48 PM


1. Create a new file called phpinfo.php with the following in it:

<?php
// Show all php information
phpinfo();
?>


2. upload to your server
3. run it from a browser
4. from the php info shown on screen, search for 'SimpleXML' and if it exists, look for 'Schema support' - enabled.
5. if step 4 has schema support for simplexml enabled, it's loaded. if not, get your webhost to install.




Largest list of competitions online!
View user's profile Visit user's homepage View All Posts By User
solbu
Member
***




Posts: 33
Registered: 1-10-2007
Location: Norway
Member Is Offline

Mood: No Mood

[*] posted on 2-26-2013 at 05:11 PM


Quote: Originally posted by lottos  

if not, get your webhost to install.
You misunderstand - I am the webhost. That's why I ask.

I implemented the steps in the post from september 7, and I get a blank page when opening the register page. So I need to know what I must install and what I need to insert in the apache config.

I've been googleing for hours, and I cannot find any example or documentation anywhere on how to activate this in a Debian server, using a Debian package manager to install needed packages and what I need to edit/insert.




My posts are licensed under a Creative Commons license
View user's profile Visit user's homepage View All Posts By User
solbu
Member
***




Posts: 33
Registered: 1-10-2007
Location: Norway
Member Is Offline

Mood: No Mood

[*] posted on 2-26-2013 at 05:15 PM


Quote: Originally posted by lottos  

4. from the php info shown on screen, search for 'SimpleXML' and if it exists, look for 'Schema support' - enabled.
Just tested, and it is enabled.
Now what.




My posts are licensed under a Creative Commons license
View user's profile Visit user's homepage View All Posts By User
solbu
Member
***




Posts: 33
Registered: 1-10-2007
Location: Norway
Member Is Offline

Mood: No Mood

[*] posted on 2-26-2013 at 05:19 PM


Quote: Originally posted by solbu  
I implemented the steps in the post from september 7, and I get a blank page when opening the register page.
And there is no errors in the logs.



My posts are licensed under a Creative Commons license
View user's profile Visit user's homepage View All Posts By User
Eminent
New Poster
**




Posts: 2
Registered: 4-8-2013
Member Is Offline


[*] posted on 4-22-2013 at 12:45 PM


Works good. But also when new memebers sign up i receive a mail with "New Spammer Registration Attempt".
Not that it's a big problem.
One questions: is it possible to view the ip-address in the email?
Thanks
View user's profile View All Posts By User
lottos
Administrator
********




Posts: 357
Registered: 6-3-2002
Location: Competitions Australia: https://www.lottos.com.au/
Member Is Offline

Mood: pass me a TimTam

[*] posted on 4-22-2013 at 12:55 PM


Could try changing (I haven't tested it)

the line

mail("youremail@youremail.com","New Spammer Registration Attempt",$email);

to

mail("youremail@youremail.com","New Spammer Registration Attempt:" $onlineip,$email);


and move that line to just above this line:
error('Go away SPAMMER');




Largest list of competitions online!
View user's profile Visit user's homepage View All Posts By User
Eminent
New Poster
**




Posts: 2
Registered: 4-8-2013
Member Is Offline


[*] posted on 5-25-2013 at 12:43 PM


Well, it work now.
First i get a parse error.
You forgot the character , after "Attempt:" in your sample above.
Second, when i move the line as you mentioned, i didn't receive an email anymore. Only the New Member email.
So i leave the line where it is, and it works good.
Thanks for your help.
View user's profile View All Posts By User
solbu
Member
***




Posts: 33
Registered: 1-10-2007
Location: Norway
Member Is Offline

Mood: No Mood

thumbup.gif posted on 5-12-2019 at 01:51 AM


Did a new attempt today, as the spam rate was getting to a level I could no longer live with,
and the code worked like a charm.

We have replaced the server since the last attempt, so newer software seems to have helped. :)




My posts are licensed under a Creative Commons license
View user's profile Visit user's homepage View All Posts By User

  Go To Top

Powered by XMB 1.9.11 (Debug Mode)
Forum Script Software by XMB © 2001-2019 The XMB Group
[Queries: 16] [PHP: 42.8% - SQL: 57.2%]
Funded with thanks to competitions website.