SASLA – Simple Anti Spam Lite Approach

Beauty of style and harmony and grace and good rhythm depends on simplicity — Plato

For the n00bs, what is SPAM anyway?

SPAM Stupid, Pointless Annoying Message

What is SASLA?

SASLA is an abbreviation of Simple Anti Spam Lite Approach and it’s pronounced as saas-laa.

For the technologically sound personalities:

SASLA is the simplest plug-n-play open-source anti-spam solution that can be easily integrated to your HTML forms and the most viable alternative to CAPTCHAs .

For the layman:

SASLA will protect your web forms from spam-bots so that you don’t need to waste your time and resources on weeding out spam.

Why should I use SASLA?

There are number of reasons:

  • It’s 100% FREE(No strings attached)
  • Beauty is in simplicity (There is nothing to configure and dead simple to implement)
  • Size Zero (Less than 1 KB)
  • No need to feed any veg hamburgers (web resources) to any other web service(s) like Akismet (It’s blazingly fast)
  • Maintenance free(No API/URI updates will stand in your way ever)
  • MIT License(One of the most simple and permissive license in the planet)

Why it’s awesome?

Reason #1: It doesn’t need an action from the user’s part unlike other anti-spam solutions, SASLA works invisibly

Spam is a webmaster’s headache and not an user’s issue and as a great fan of usability and conversions, I’ve always hated the majority of anti-spam solutions in the market like CAPTCHAs and their derivatives or any other initiatives that requires an action from the user’s side.

Also the existing anti-spam solutions affect usability and conversions in a bigger way.

Reason #2: Simple to implement, small in size, low in resources and tested before public release

Did you know?

SASLA is having less than 50 lines of code.

I’ve tested SASLA in 10 of my client’s sites (having a monthly traffic of 20,000+ unique visitors) before releasing it to the public and SASLA’s success rate was 100% with-out any false positives. Also SASLA will never ever block any legitimate user!

Any downsides

  1. It doesn’t protect you against a human spammer who manually writes and submits spam.
  2. Will not work on browsers with JavaScript disabled

Where can I use SASLA?

You can use it in any web form that accepts public input.

Some examples are:

  • Forums
  • Feedback forms
  • Contact forms
  • Web application
  • Mail subscription forms
  • Etc…(left to your imagination)


  1. PHP (PHP 5 or greater preferred)
  2. A JavaScript enabled browser 

How is it licensed?

It’s licensed under MIT license, which means:

You can:

  • re-use the code freely for your own use
  • re-use the code freely for non-commercial & commercial re-distribution

You can’t:

  • claim authorship of the software,
  • You cannot attack the original author for any damages caused by using this code.

Download / Fork

17 Responses

  1. Jassica Bella November 18, 2014 / 8:03 AM

    This is a Great Post superb Work , Information is Good Really Thanks For Sharing me Keep it up , Regard

  2. Beatty Max July 8, 2015 / 7:13 PM

    This sounds promising! I downloaded the master file (zipped) and tried uploading it as a plugin but … it’s not a plugin as WordPress tells me. So how does one use it? FTP the sasla.php directly into the directory? Do I need to activate it?

    • Mithun John Jacob September 21, 2015 / 3:05 PM

      Sorry, this is not a WP plugin. Its meant to be used in standalone PHP projects.

  3. Michael August 24, 2015 / 2:29 AM

    Is there anything built in here to prevent resubmission of the form with the refresh/back button?

    • Mithun John Jacob September 21, 2015 / 3:09 PM

      Did you meant any functionality to save the form from continuous resubmission(s)?

  4. steve January 4, 2017 / 8:06 AM

    Mithun, just tried this out. Works perfectly. So much better than the regular captcha we had on our business contact form.

    Good job.

  5. Matthew Willis August 16, 2017 / 4:22 AM

    Hi there, I stumbled upon this page looking for a simple solution to spam going to a small form I made for a low traffic website. This looks great and seems to work, so thank you! I applied the code and was able to successfully fill out the form as a valid user, but is there a way to test it to make sure it’s blocking spam?

    • Mithun John Jacob August 17, 2017 / 10:16 PM

      Glad to know that you liked it, Matthew.

      To test the functionality, you’ve to use any spamming tools used by the real spammers 🙂

  6. Adam October 25, 2017 / 8:21 AM

    I’ve been getting a lot of SPAM coming through over the past month or two. Has something changed; did I miss an update?
    Thanks for the great solution, but I might need to integrate some other easy way stopping ‘contact form’ SPAM.

    • Adam October 25, 2017 / 9:26 AM

      Actually, do I need to be running a specific PHP version for it to work?

        • Adam October 27, 2017 / 5:28 PM

          Hmm. I had it commented out during development XD Hopefully that will fix it, or there’s some guy somewhere manually entering comment form SPAM.

          Thanks Mithun!

          It’s difficult to find this project BTW. Maybe a seperate website with a donate button?

          • Mithun John Jacob October 27, 2017 / 10:02 PM

            Hello Adam,

            Thank you for your appreciation.

            Uncomment that code block and post your experience.

            Planning to update SASLA soon. Stay tuned!

  7. Eliseu February 24, 2020 / 9:07 AM

    Has Sasla been discontinued?

    • Mithun John Jacob February 24, 2020 / 12:13 PM

      No, its not discontinued. You can download it.

      What’s the issue that you are facing?

Leave a Reply

Your email address will not be published. Required fields are marked *