PHP code example of webignition / sfs-client
1. Go to this page and download the library: Download webignition/sfs-client 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/ */
webignition / sfs-client example snippets
use webignition\SfsClient\Client;
use webignition\SfsResultInterfaces\ResultInterface;
$client = new Cient();
// Query against a single email address
$result = $client->queryEmail('[email protected]');
// $result will be NULL if the HTTP request to query api.stopforumspam.com failed for any reason
if ($result instanceof ResultInterface) {
$result->getType(); // 'email', 'emailHash', 'ip' or 'username'
$result->getFrequency(); // int
$result->getAppears(); // bool
$result->getValue(); // the email address, email hash, IP address or username
$result->getLastSeen() // \DateTime()|null
$result->getConfidence() // float|null
$result->getDelegatedCountryCode(); // string|null
$result->getCountryCode(); // string|null
$result->getAsn(); // int|null
$result->isBlacklisted(); // bool
$result->isTorExitNode(); // bool|null
}