Skip to content

Helps weed out spam accounts during signups. Allows you to check usernames, emails and/or ip addresses against stopforumspam.com.

Notifications You must be signed in to change notification settings

dkleehammer/node-stopforumspam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#node-stopforumspam

Helps weed out spam accounts during signups. Allows you to check usernames, emails and/or ip addresses against stopforumspam.com API.

Installation

npm install spamcheck

Examples

Use in registration page

var sfs = require('spamcheck');  // get our object

// call checkspammer with any mixture of the following properties in the object to check: ['username', 'email', 'ip']
sfs.checkSpammer({ip: req.connection.remoteAddress, email: req.body.email}, function(err, isSpammer) {
  if (err) console.log(err);
  
  if (isSpammer) {
    // user is spam, send back a custom status code with nice message or our spammer.
    res.send(452, 'You are listed as a spammer and registration will not continue.');
  } else {  
    // user is not spam, register the user.
    
    // insert into the db, etc.
  }
});

Help

Please visit the stopforumspam.com API documenation to fully understand the way this works.

Notes

StopForumSpam.com will allow up to 20,000 API requests daily. If you need more, please see their database page. They provide hourly updates to their database that you can download and work with directly and locally.

About

Helps weed out spam accounts during signups. Allows you to check usernames, emails and/or ip addresses against stopforumspam.com.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published