Read from the package's own PHP files at the commit f06bd4c01fc7: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
StopforumspamGatewayclassStopForumSpam's API (https://www.stopforumspam.com/usage): one POST - so that nothing of the visitor shows in an address a proxy logs - with ip, email or emailhash, username and json; for each part asked, whether it appears, how often (frequency, 255 for StopForumSpam's own blacklists), when last (lastseen, UTC), how surely (confidence, a percentage), and torexit for a Tor exit node.
6 methods · 2 constants
StopforumspamGatewayFactoryclassStopForumSpam: are this IP address, this e-mail, this name reported for abuse. Looking up needs no key; reporting does.
9 options · 1 method
Omnishield\Stopforumspam
StopforumspamGateway class
final class StopforumspamGateway implements ReputationInterface StopforumspamGateway.php:29
StopForumSpam's API (https://www.stopforumspam.com/usage): one POST - so that nothing of the visitor shows in an address a proxy logs - with ip, email or emailhash, username and json; for each part asked, whether it appears, how often (frequency, 255 for StopForumSpam's own blacklists), when last (lastseen, UTC), how surely (confidence, a percentage), and torexit for a Tor exit node.
A part counts when it appears and its confidence reaches the threshold: StopForumSpam gives a confidence even for an address that no longer appears (expire), and a reported address seen three times long ago scores under 1.
const BASE_URI = 'https://api.stopforumspam.org/api'const REPORT_URI = 'https://www.stopforumspam.com/add'
StopforumspamGateway::__construct()
public function __construct(readonly HttpClientInterface $http, readonly float $threshold = 50, readonly array $send = ['ip', 'email', 'name'], readonly bool $hashEmail = true, readonly ?int $expire = null, readonly string $tor = 'neutral', readonly bool $wildcards = true, readonly ?string $apiKey = null, readonly string $baseUri = self::BASE_URI, readonly string $reportUri = self::REPORT_URI)StopforumspamGateway::getName()
public function getName(): stringStopforumspamGateway::getTitle()
public function getTitle(): stringStopforumspamGateway::capabilities()
public function capabilities(): CapabilitiesStopforumspamGateway::lookup()
public function lookup(Identity $identity): ReputationStopforumspamGateway::report()
public function report(Identity $identity, string $evidence = ''): voidReports a spammer to StopForumSpam: their address, e-mail and name - all three, StopForumSpam takes nothing less - and what they posted, as evidence. Needs an API key of StopForumSpam's.
StopforumspamGatewayFactory class
final class StopforumspamGatewayFactory extends GatewayFactory StopforumspamGatewayFactory.php:33
StopForumSpam: are this IP address, this e-mail, this name reported for abuse. Looking up needs no key; reporting does.
options: threshold: 50 # the confidence (0-100) from which a match counts send: [ip, email, name] # what of the visitor is sent - the address leaves the site: say so in the privacy policy hash_email: true # the e-mail as its MD5 (emailhash), not in clear; StopForumSpam then normalises nothing (Gmail's dots, +tags) expire: ~ # days: a sighting older than that does not count tor: neutral # neutral: a Tor exit node counts as reported; ignore: never; block: always wildcards: true # false: StopForumSpam's own lists of hostile domains, names and networks left out (nobadall) api_key: '%env(default::STOPFORUMSPAM_API_KEY)%' # only to report a spammer base_uri: https://api.stopforumspam.org/api # europe.stopforumspam.org, us.stopforumspam.org to stay in a region report_uri: https://www.stopforumspam.com/add
StopForumSpam's terms (https://www.stopforumspam.com/usage, read on 2026-10-07): 100,000 queries a day, non-commercial use - a commercial system may use the data for its own, internal use -, and not as a firewall: ask about the people who submit a form, never about every visitor.
Options
| Option | Default | |
|---|---|---|
threshold | 50 | |
send | ['ip', 'email', 'name'] | |
hash_email | true | |
expire | null | |
tor | 'neutral' | |
wildcards | true | |
api_key | null | |
base_uri | StopforumspamGateway::BASE_URI | |
report_uri | StopforumspamGateway::REPORT_URI |
StopforumspamGatewayFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)