ampersa / surbl
一个用于轻松测试链接和URL是否在surbl.org上列出的包
0.4
2021-02-17 17:51 UTC
Requires
- php: ^7.0 | ^8.0
- league/uri: ^6.0
Requires (Dev)
- phpunit/phpunit: ^9.0
README
此包使您能够使用URL查询multi.surbl.org并确定该域名是否被列出。
安装
Composer
$ composer require ampersa/surbl
用法
基本用法
use Ampersa\SURBL\SURBL; ... $surbl = new SURBL; $result = $surbl->listed('http://ampersa.co.uk'); // Returns: (bool) false $result = $surbl->listed('http://surbl-org-permanent-test-point.com/'); // Returns: (bool) true
指定要查询的列表
默认情况下,所有列表(phishing(PH)、malware(MW)、AbuseButler(ABUSE)和cracked(CR))都会被查询。
要指定要使用的列表,请将选项掩码传递给构造函数
$surbl = new SURBL(SURBL::LIST_PH | SURBL::LIST_MW); $result = $surbl->listed('http://surbl-org-permanent-test-point.com/'); // Returns: (bool) false
静态调用
已包含一个静态访问器,以提供对listed()函数的简写访问。第二个参数可用于传递选项掩码。
$result = SURBL::isListed('http://surbl-org-permanent-test-point.com/'); // Returns: (bool) true $result = SURBL::isListed('http://surbl-org-permanent-test-point.com/', SURBL::LIST_PH | SURBL::LIST_MW); // Returns: (bool) false
贡献
- 分叉它!
- 创建您的功能分支:
git checkout -b my-new-feature
- 提交您的更改:
git commit -am '添加一些功能'
- 将更改推送到分支:
git push origin my-new-feature
- 提交拉取请求