Code Monkey home page Code Monkey logo

node-stopforumspam's Introduction

#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.

node-stopforumspam's People

Contributors

dkleehammer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.