webignition/sfs-result-analyser

Analyses results from api.stopforumspam.com, helps you figure out what to do

0.1 2019-04-12 12:01 UTC

This package is auto-updated.

Last update: 2024-10-13 00:26:13 UTC


README

Analyses results from api.stopforumspam.com, helps you figure out what to do.

Why?

You can use webignition/sfs-client to query api.stopforumspam.com and get back one or more webignition\SfsResultInterfaces\ResultInterface objects.

You've probably queried api.stopforumspam.com because you need to know if a given email address, IP address or username is known to be untrustworthy.

This helps with that.

Installation

composer require webignition/sfs-result-analyser

Usage

use webignition\SfsResultAnalyser\Analyser;
use webignition\SfsResultInterfaces\ResultInterface;

// We're assuming that $result is a ResultInterface object.

$analyser = new Analyser();

// Does a given result indicate that the entity is not to be trusted?
$analyser->isUntrustworthy($result));
// returns true or false

// Is a given result's entity trustworthy?
// Return a float between 0 (do not trust) and 1 (probably can be trusted)
$trustworthiness = $analyser->calculateTrustworthiness($result);

See Also

Use webignition/sfs-querier for a package that contains webignition/sfs-result-analyser, webignition/sfs-client and provides detailed usage instructions.