Spammer Slapper API Documentation

Please note that this is alpha grade software and the API can change at any moment. You will need a valid API key in order to use this product. You may request one from the home page

The Basics

The SpammerSlapper accepts GET or POST requests on port 80 at The two required paramaters are:

The Query Data constists of the following (all are optional and by default empty): The current options allow you to control which tests will run (by default all test will run except for CHECK_PROXY):

Submitting a Check Request

To submit a check, simply create a properly formated JSON string with the above query data and variables. Any values left out will fallback to the defaults. Encode the string in BASE64 and send it via POST or GET to Be sure to include the key parameter, otherwise you'll get back an error. The POST method is recomended.

An example of a properly formated query string in JSON format before encoding in BASE64:

{"IP_ADDRESS":"","EMAIL_ADDRESS":null,"MESSAGE":"Testing 1..2....3",

Upon a sucessfull query, the server will respond back with another JSON string in plain text (not encoded in BASE64). This contains the results of the SPAM check.


The return values are explained below:

PHP Library

SpammerSlapper has made available an easy to use PHP library that can be used during your server side processing scripts. The library is available from this website. Below is a simple example that will just check the IP address with all default testing options.

    $result = spammerslapper_check('XXXXXXAPI_KEYXXXXXXX');
      //Code for faluire goes here
    else {
      //Code for success can go here.

Download the SpammerSlapper PHP Library here.

The spammerslapper_check() function accepts two additional paramaters as arrays. The first is an array contiaining additional data to check, such as message text, message subject, email address, username, and an override to the automaticly detected IP address. NOTE: unused items can be omitted.

  $data = array(
    'message' => 'Testing 1...2...3',
    'subject' => 'Hello World',
    'emailAddress' => 'nobody@nowhere.tld',
    'username' => 'someone',
    'remoteAddress' => '',

The second array contains options to override the defaults. NOTE: default options can be omitted.

  $options = array(
    'CHECK_SPAMASSASIN' => false,
    'CHECK_PROXY' => true,
    'CHECK_HTTPBL' => true,
    'CHECK_FORUMSPAM' => true,
    'CHECK_EMAIL' => false
    'CHECK_DBLORG' => false
    'CHECK_SPAMHAUSDBL' => false

To use the extra check data and additional options, just pass the paramaters like shown:

$result = spammerslapper_check('XXXXXXAPI_KEYXXXXXXX', $data, $options);

The SpammerSlapperResult object contains additional usefull information:

Download the SpammerSlapper PHP Library here.

Want a button for your site? Click HERE to get one.

Powered by Pacy
Powered by Pacy