Analyses results from api.stopforumspam.com, helps you figure out what to do
Analyses results from api.stopforumspam.com, helps you figure out what to do.
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.
composer require webignition/sfs-result-analyser
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);