Download the PHP package sithous/antispam-bundle without Composer
On this page you can find all versions of the php package sithous/antispam-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sithous/antispam-bundle
More information about sithous/antispam-bundle
Files in sithous/antispam-bundle
Package antispam-bundle
Short Description Provides Anti-Spam capabilities to Symfony in an easy to use package..
License MIT
Homepage http://github.com/sithous
Informations about the package antispam-bundle
AntiSpamBundle
Provides Anti-Spam capabilities to Symfony in an easy to use package.
Check us out on packagist! https://packagist.org/packages/sithous/antispam-bundle
We recommend using fixtures to load in your SithousAntiSpamTypes
so they can be moved to the production server or vice versa.
Requirements
- => PHP 5.3.2
- => Symfony 2.3
- => Symfony Console 2.3
- Doctrine
Installation
Step 1: Add to composer
add the bundle to your root composer.json file under the require
section
After adding that run composer to fetch the package into your vendors folder
Step 2: Enable the bundle
Enable the bundle by adding the following to the app/config/appKernel.php
Step 3: Update database
First, verify the SQL to make sure nothing will break
If everything looks good, execute the schema update.
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.
If you want to use cron garbage collection you will need to make a cron job run the following command:
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:
Now in your controller function you will run the verify command before submitting the vote
If you later want to remove a SithousAntiSpamType run the following command: