PHPackages                             sithous/antispam-bundle - 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. [Security](/categories/security)
4. /
5. sithous/antispam-bundle

ActiveSymfony-bundle[Security](/categories/security)

sithous/antispam-bundle
=======================

Provides Anti-Spam capabilities to Symfony in an easy to use package..

1.0.3(8y ago)16191MITPHPPHP &gt;=5.3.2

Since Aug 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Sithous/AntiSpamBundle)[ Packagist](https://packagist.org/packages/sithous/antispam-bundle)[ Docs](http://github.com/sithous)[ RSS](/packages/sithous-antispam-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

AntiSpamBundle
==============

[](#antispambundle)

Provides Anti-Spam capabilities to Symfony in an easy to use package.

Check us out on packagist!

We recommend using fixtures to load in your `SithousAntiSpamTypes` so they can be moved to the production server or vice versa.

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

[](#requirements)

- =&gt; PHP 5.3.2
- =&gt; Symfony 2.3
- =&gt; Symfony Console 2.3
- Doctrine

Installation
------------

[](#installation)

### Step 1: Add to composer

[](#step-1-add-to-composer)

add the bundle to your root composer.json file under the `require` section

```
"sithous/antispam-bundle": "1.0.*"

```

After adding that run composer to fetch the package into your vendors folder

```
php composer.phar update

```

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle by adding the following to the `app/config/appKernel.php`

```
new Sithous\AntiSpamBundle\SithousAntiSpamBundle(),

```

### Step 3: Update database

[](#step-3-update-database)

First, verify the SQL to make sure nothing will break

```
php app/console doctrine:schema:update --dump-sql

```

If everything looks good, execute the schema update.

```
php app/console doctrine:schema:update --force

```

Configuration
-------------

[](#configuration)

By default the AntiSpamBundle runs garbage collection every time a verify() call is made. You can change this to run in a cron every couple minutes by setting `active_gc` to true.

```
# app/config/config.yml
sithous_anti_spam:
    active_gc: true   # set to false to use cron garbage collection

```

If you want to use cron garbage collection you will need to make a cron job run the following command:

```
php app/console sithous:antispambundle:gc

```

Example Usage
-------------

[](#example-usage)

A good example is if you want users to be able to vote on something but only want the user and IP of user to vote once a day. To do this you would first generate the SithousAntiSpamType using the following command:

```
$ php app/console sithous:antispam:generate
Please enter the ID for this type: vote_protection
Track IP [Y/N]? Y
Track User [Y/N]? Y
Max Time to track action (seconds): 86400
Max Calls that can happin in MaxTime: 1

ID: vote_protection
trackIp: true
trackUser: true
maxTime: 86400 seconds
maxCalls: 1

Is the above information correct [Y/N]? Y
Successfully added SithousAntiSpamType "vote_protection"

```

Now in your controller function you will run the verify command before submitting the vote

```
    public function submitVoteAction(Request $request)
    {
        // somewhere in your code...

        $spamCheck = $this->get('sithous.antispam');
        if(!$spamCheck->setType('vote_protection')->verify())
        {
            return new JsonResponse(array(
                'result'  => 'error',
                'message' => $spamCheck->getErrorMessage()
            ));
        }
    }

```

If you later want to remove a SithousAntiSpamType run the following command:

```
$ php app/console sithous:antispam:delete
Enter the SithousAntiSpamType ID to delete: vote_protection
Successfully removed SithousAntiSpamType "vote_protection"

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~400 days

Total

4

Last Release

3074d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76c72b14bf061b6d22199f094bf67174f3963aec7741e3d823466ddb3ebf741c?d=identicon)[skylord123](/maintainers/skylord123)

---

Top Contributors

[![skylord123](https://avatars.githubusercontent.com/u/3412313?v=4)](https://github.com/skylord123 "skylord123 (35 commits)")

---

Tags

anti-spamprotectionbrute force

### Embed Badge

![Health badge](/badges/sithous-antispam-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/sithous-antispam-bundle/health.svg)](https://phpackages.com/packages/sithous-antispam-bundle)
```

###  Alternatives

[phpmussel/phpmussel

PHP-based anti-virus anti-trojan anti-malware solution.

431228.1k1](/packages/phpmussel-phpmussel)[maba/gentle-force-bundle

Symfony bundle that integrates gentle-force library for limiting both brute-force attempts and ordinary requests, using leaky/token bucket algorithm, based on Redis

53517.6k1](/packages/maba-gentle-force-bundle)[fabianwennink/iconcaptcha

IconCaptcha is a self-hosted, customizable, easy-to-implement and user-friendly captcha.

17740.5k1](/packages/fabianwennink-iconcaptcha)[maba/gentle-force

Library for limiting both brute-force attempts and ordinary requests, using leaky/token bucket algorithm, based on Redis

45591.0k2](/packages/maba-gentle-force)[anyx/login-gate-bundle

Checking brute force attacks on site

59339.5k](/packages/anyx-login-gate-bundle)[usarise/turnstile

PHP library for Turnstile, is Cloudflare’s smart CAPTCHA alternative. It can be embedded into any website without sending traffic through Cloudflare and works without showing visitors a CAPTCHA.

2393.5k6](/packages/usarise-turnstile)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
