webignition / sfs-client
用于查询api.stopforumspam.com的HTTP客户端
0.2
2019-04-12 15:22 UTC
Requires
- php: >=7.2.0
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.3
- psr/http-message: ^1.0
- webignition/sfs-result-factory: >=0.1,<1
Requires (Dev)
- phpstan/phpstan: ^0.11.5
- phpunit/phpunit: ^8.1
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2024-09-13 04:24:50 UTC
README
PHP HTTP客户端,用于查询api.stopforumspam.com。
安装
composer require webignition/sfs-client
api.stopformumspam.com概述
api.stopforumspam.com可以通过电子邮件地址、电子邮件哈希、IP地址或用户名进行查询。可以提供可选标志来影响返回结果类型。
如果您不熟悉,请先阅读api.stopforumspam.com使用指南。
使用方法
快速使用示例
use webignition\SfsClient\Client; use webignition\SfsResultInterfaces\ResultInterface; $client = new Cient(); // Query against a single email address $result = $client->queryEmail('user@example.com'); // $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 }
理解和分析结果
您可能想知道给定的电子邮件地址/IP地址/用户名是否可以信任其在应用程序中执行操作。
请参阅webignition/sfs-result-analyser以获取帮助。
另请参阅
使用webignition/sfs-querier,其中包含webignition/sfs-result-analyser、webignition/sfs-client并提供详细的用法说明。