Wrapper for API www.stopforumspam.com (api.stopforumspam.org)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.php_cs.dist
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Wrapper for API stopforumspam.com

Build Status

Requirements:

  • PHP >= 5.6
  • ext-curl

Installation:

composer require gemorroj/stop-spam

Example check IP:

<?php
use StopSpam\Request;
use StopSpam\Query;

$query = new Query();
$query->addIp('1.2.3.4');

$request = new Request();
$response = $request->send($query);
$item = $response->getFlowingIp();
var_dump($item->isAppears()); // bool (true)
Async example
<?php
use StopSpam\Request;
use StopSpam\Query;
use StopSpam\Response;

$query = new Query();
$query->addIp('1.2.3.4');

$request = new Request();
$request->sendAsync($query, function (Response $response) {
    $item = $response->getFlowingIp();
    var_dump($item->isAppears()); // bool (true)
});