Download the PHP package psilocyberunner/stop-forum-spam without Composer
On this page you can find all versions of the php package psilocyberunner/stop-forum-spam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download psilocyberunner/stop-forum-spam
More information about psilocyberunner/stop-forum-spam
Files in psilocyberunner/stop-forum-spam
Package stop-forum-spam
Short Description PHP wrapper for stopforumspam.com web service API
License MIT
Informations about the package stop-forum-spam
stop-forum-spam
PHP wrapper for https://www.stopforumspam.com/usage web service API as a standalone library.
Installation
Clone this repository
git clone [email protected]:psilocyberunner/stop-forum-spam.git
Or require package via composer
composer require psilocyberunner/stop-forum-spam
Usage
First of all - bootstrap the application (see public/bootstrap.php for details)
Search by email
Example response
Search by domain
This search is almost equal to email search except that it uses wildcard list of hostile domains. No additional options are available as just a list of domains is used: https://www.stopforumspam.com/downloads/toxic_domains_whole.txt
Example response
For not found domains you'll get
Search by email hash
Email hash is plain md5 checksum for email address
Example response
Search by ip
Example response
Search by username
Example response
Multiple search parameters
Example response
Search by bulk data
If you want to search for several IPs, usernames or emails at once - you can use SearchByBulk class. Up to 15 queries of any field combination can be made by constructing the fields as an array, as below.
Example response
Submit your spammer data
You'll need your personal API token to use this feature. Register at https://www.stopforumspam.com/ and get one.
For submit spam requests only response codes are indicators of success/failure. No JSON in returned.
After submit request you can see all of your spammers data in special section of https://www.stopforumspam.com/ web site called https://www.stopforumspam.com/myspammers.
Wildcards
SFS operate a list of email domains, usernames and IP addresses which are considered hostile. You may wish to ignore these lists, in this case you need to add the following URL parameters
To ignore the email/domain list checks
To ignore the username (partial string) list checks
To ignore the IP lists (which includes some of the Internets most hostile spam friendly networks)
Or to ignore all wildcard checks
Geographic Access
The API provides several geographically diverse locations.
api.stopforumspam.org should be used as this will direct your query to the closest regional server in order to provide the quickest response. Should you wish to restrict traffic to a specific region, such as for compliance with company or country privacy regulations, then you can force a connection to a specific region.
Tor Exit Nodes
Logic available in IP search only. Known Tor exit nodes will be included in all serialised replies. If you wish to ignore the listing for any known Tor exit node, then include the
call in the request. Any IP address listed that is known as a Tor exit node will return a frequency of 0.
Some administrators may wish to block a known Tor exit node regardless of it's listing. A result for an IP that is recorded as a Tor exit node will return a frequency of 255 regardless of being listed or not. Use as:
Some useful methods
Method call withConfidence() will include in response additional info about confidence score
$client->withConfidence();
Method call withUnixTimestamp() will return data/time results as UNIXTIME format, that being seconds since Unix epoch
$client->withUnixTimestamp();
Method call withExpire(10) provides the ability to have API results filtered if the lastseen date is older than the age (in days).
$client->withExpire(10);
Method call asJSONP('function name') provide ajax/jquery support with JSONP, which allows for a callback function to be specified around a json result.
$client->asJSONP('test');
Response example