Download the PHP package gorankrgovic/spam-marker without Composer

On this page you can find all versions of the php package gorankrgovic/spam-marker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package spam-marker

SpamMarker PHP library

SpamMarker is a simple library for detecting spam in provided strings. It follows the open closed principle by introducing Spam Filters which are just separate classes used to extend the SpamMarker detecting capabilities.

The original idea, and actually a slightly different library, is from a lib called Spam Filter by Laju Morrison, which you can find here.

I was just tired of all sorts of spam which comes from the user input on my projects, so I finally created this.

Instalation

This library can be loaded into your projects using Composer or by re-inventing the wheel and creating your own autoloader.

Instalation via composer:

Setup and basic usage

This should be done once throughout the app.

Each time you call the check() method on a string, it returns a SpamOutput Object which holds the spam check result and messages.

You can change various stuff inside such as messages for each filter. with two methods:

Calling setOption function:

Or by initializing with different config

Currently provided filters

1. BlackListed Filter:

The black list detector flags a string as a spam if it contains any of one or more words that has been added to the black list. Strings could be formed from Regular Expressions or a Character Sequence.

2. BlackListedFile Filter:

This one is similar to the above but it fetches regex'es and string from provided folder. Currently the folder is in src/Filter/blacklists. If you want to provide your own files, upon init you must declare the folder path:

Please DO NOT forget to add the index file which contains the filenames within the provided directory.

3. TooManyEmails Filter:

The name says it all. It matches the number of links in string. It's configurable easy like:

4. TooManyLinks Filter:

How many links we can allow in the string

5. TooManyPhones Filter:

How many phone numbers we can allow.

6. TooManyUppercase Filter:

How many uppercase words are allowed in string. Useful when someones enter the FREE FREE BLAH BLAH DISCOUNT OFF.

Creating your own custom Filter

You create a detector simply by creating a class that implements the FilterInterface which defines the following contract.

Your filter must return an array of:

After creating your own filter, you add it using the registerFilter() method in the SpamMarker.

License

The MIT License (MIT). Please see LICENSE for more information.

Voila!


All versions of spam-marker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gorankrgovic/spam-marker contains the following files

Loading the files please wait ....