定制 rndoom04/spamdetector 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rndoom04/spamdetector

Composer 安装命令:

composer require rndoom04/spamdetector

包简介

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

README 文档

README

PHP test(). Compatible with PHP >= 7.0.

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

Install

For PHP version >= 7.0:

composer require Rndoom04/spamdetector

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);

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固