PHPackages                             rndoom04/spamdetector - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. rndoom04/spamdetector

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

rndoom04/spamdetector
=====================

A library detecting spam in forms or other strings. Friendly use with clear PHP, Nette framework, etc..

v1.0.0(4y ago)16MITPHPPHP &gt;=7.0

Since Feb 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Rndoom04/spamdetector)[ Packagist](https://packagist.org/packages/rndoom04/spamdetector)[ RSS](/packages/rndoom04-spamdetector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

SpamDetector
============

[](#spamdetector)

PHP `test()`. Compatible with PHP &gt;= 7.0.

This is a simple library for detect spam from string - good for example contacts forms

Install
-------

[](#install)

For PHP version **`>= 7.0`**:

```
composer require Rndoom04/spamdetector

```

How to use it
-------------

[](#how-to-use-it)

Firstly init the library by simply "use".

```
use Rndoom04\spamdetector;

```

Then set load the library and set it how you want.

```
$spamdetector = new \Rndoom04\spamdetector\detector();

$spamdetector->detectLanguage(true); // Detect language? Default false
$spamdetector->setLanguageWhitelist(["cs", "sk", "en"]); // Only cs (czech language), sk (slovak language) and en (english)
$spamdetector->setTestForbiddenWords(true); // Test on forbidden words? Default true
$spamdetector->setTestUrls(true); // Test on URLs? Default true

```

Easy! Let's test detecting.

```
// One test
echo $spamdetector->test("Is this string ok?");

```

```
// Variable test
$testString = "Is this next string ok?";
echo $spamdetector->test($testString);

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1546d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0b271462edeed5d7a0d531c7ba6d9e0a544129006f7f1b4de155db16839ebe4?d=identicon)[Rndoom04](/maintainers/Rndoom04)

---

Top Contributors

[![Rndoom04](https://avatars.githubusercontent.com/u/53907816?v=4)](https://github.com/Rndoom04 "Rndoom04 (3 commits)")

### Embed Badge

![Health badge](/badges/rndoom04-spamdetector/health.svg)

```
[![Health](https://phpackages.com/badges/rndoom04-spamdetector/health.svg)](https://phpackages.com/packages/rndoom04-spamdetector)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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