PHPackages                             chillu/memberspamcheck - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chillu/memberspamcheck

AbandonedArchivedSilverstripe-module[Utility &amp; Helpers](/categories/utility)

chillu/memberspamcheck
======================

Extensions for flagging members as spam

462PHP

Since Feb 22Pushed 10y agoCompare

[ Source](https://github.com/chillu/silverstripe-memberspamcheck)[ Packagist](https://packagist.org/packages/chillu/memberspamcheck)[ RSS](/packages/chillu-memberspamcheck/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Member Spam Checker Module
==========================

[](#member-spam-checker-module)

Overview
--------

[](#overview)

Checks existing member records for signs of spam, based on their user data. Helpful addition to the forum module in order to combat spam signups which get past standard captch techniques.

By default, it hooks into the free API of [stopforumspam.org](http://stopforumspam.org)(only for non-commercial use, see [terms of service](http://stopforumspam.com/usage)).

Maintainer
----------

[](#maintainer)

- Ingo Schommer

Requirements
------------

[](#requirements)

- SilverStripe 3.1 or newer
- PHP 5.3 or newer (with JSON support)
- PHP curl extension

Usage
-----

[](#usage)

Run `php sapphire/cli-script.php MemberSpamCheckTask` on the commandline, which will run a check against a predefined amount of `Member` records, starting with the newest by creation date. It writes the `SpamCheckScore` and `SpamCheckData` properties for each record, based on the implemented check classes.

Spam Score
----------

[](#spam-score)

A score of `-1` means the record hasn't been checked, `0` means its not detected as spam, and `1-100` is the aggregated spam score based on various criteria in the implemented check classes.

Supported Member Properties
---------------------------

[](#supported-member-properties)

By default, three properties are supported on the `Member` class: `Email`, `Nickname` and `IP`(see `MemberSpamCheckService::$default_property_map`). Only `Email` is activated by default. The other two fields depend on your usage (and extension) of the `Member` class. The [forum module](http://www.silverstripe.org/forum-module) adds `Nickname`.

`IP` tracking has to be defined in custom code (e.g. in your signup logic). You can use the `SS_HTTPRequest->getIP()` method to retrieve the client IP. It is highly recommended to use this flag, as the originating IP is one of the strongest criteria to determine spam scores. See "Howto: Track IP signups on the forum module" below.

Howto
-----

[](#howto)

### Track IP signups on forum

[](#track-ip-signups-on-forum)

The [forum module](http://www.silverstripe.org/forum-module) has an `onForumRegister()`hook which is invoked on a new `Member` record. We can use this to track `IP` information:

`mysite/code/MyMemberExtension.php`:

```
