PHP code example of psilocyberunner / stop-forum-spam
1. Go to this page and download the library: Download psilocyberunner/stop-forum-spam library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
psilocyberunner / stop-forum-spam example snippets
d exception handler, Whoops is a good choice for your experiments
$whoops = new \Whoops\Run;
$whoops->prependHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
use StopForumSpam\SearchByEmail;
= new SearchByEmail('[email protected]');
$client->asJSON();
$client->withConfidence(); # If you need confidence score
/** @var Psr\Http\Message\ResponseInterface $result */
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchByDomain;
rchByDomain('kinogomyhit.ru');
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchByEmailHash;
cksum for desired email)
$client = new SearchByEmailHash(md5('[email protected]'));
$client->withConfidence(); # If you need confidence score
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchByIp;
= new SearchByIp('77.111.247.62');
$client->asJSON();
$client->withConfidence(); # If you need confidence score
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchByUsername;
earchByUsername('Nicole');
$client->asJSON();
$client->withConfidence(); # If you need confidence score
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchMultiple;
client = new SearchMultiple([
'email' => '[email protected]',
'ip' => '77.111.247.62',
'username' => 'c0dex',
]);
$client->withConfidence(); # If you need confidence score
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchByBulk;
$client = new SearchByBulk([
'ip' => [
'127.0.0.1',
'77.111.247.62',
],
'username' => [
'Nicole',
'some-random-username-for-test',
],
'email' => [
'[email protected]',
'[email protected]',
],
]);
$client->withConfidence(); # If you need confidence score
$result = $client->search();
return $result->getBody()->getContents();
use StopForumSpam\SearchMultiple;
bmitSpamReport();
$client->setApiToken('token');
$client->setIpAddress('178.159.37.84'); # already listed as spam source
$client->setEmail('[email protected]');
$client->setEvidence('evidence');
$client->setUsername('tester');
$result = $client->submit();
return $result->getStatusCode();
$client->withNoBadEmail();
$client->withNoBadUsername();
$client->withNoBadIp();
$client->withNoBadAll();
$client = new SearchByEmail('[email protected]');
$client->useEuropeRegion(); # If you want to use Europe region servers
$client = new SearchByIp('127.0.0.1');
$client->useUSRegion(); # If you want to use US region servers