mika56/spfcheck
Composer 安装命令:
composer require mika56/spfcheck
包简介
Checks an IP address against a domain's SPF record
README 文档
README
Simple library to check an IP address against a domain's SPF record
Requirements
This library requires a supported version of PHP, that is PHP >= 8.1.
Older versions of this library support older versions of PHP. Please note that no bugfixes, no new features, and no support will be provided for older versions.
| Library version | Min version of PHP | Highest version of PHP |
|---|---|---|
| 1 | 5.6 | 5.6 |
| 2 | 7.4 | 8.3 |
| 3 | 8.1 | 8.4 |
Installation
This library is available through Composer.
Run composer require "mika56/spfcheck:^3.0" or add this to your composer.json:
{
"require": {
"mika56/spfcheck": "^3.0"
}
}
Usage
Create a new instance of SPFCheck. The constructor requires a DNSRecordGetterInterface to be passed. Included in this library is DNSRecordGetter,
which uses PHP's DNS function dns_get_record to get data. Please take a look at mika56/spfcheck-dns-direct
if you want to use custom DNS servers.
<?php use Mika56\SPFCheck\DNS\DNSRecordGetter; use Mika56\SPFCheck\SPFCheck; require('vendor/autoload.php'); $checker = new SPFCheck(new DNSRecordGetter()); var_dump($checker->getIPStringResult('127.0.0.1', 'test.com'));
Return value is one of Result::SHORT_PASS, Result::SHORT_FAIL, Result::SHORT_SOFTFAIL, Result::SHORT_NEUTRAL, Result::SHORT_NONE, Result::SHORT_PERMERROR,
Result::SHORT_TEMPERROR
If you want to get more details about the check, you can use SPFCheck::getResult(Query $query): Result which will return a Result object with more details about the check.
mika56/spfcheck 适用场景与选型建议
mika56/spfcheck 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.11M 次下载、GitHub Stars 达 45, 最近一次更新时间为 2016 年 03 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「email」 「spf」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mika56/spfcheck 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mika56/spfcheck 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mika56/spfcheck 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
WordPress mu-plugin to set sender/return path for mail if not set..
This authres_status plugin checks the Authentication-Results headers of your emails and displays the verification status. The verification status is displayed when you read an email, but you can also add a column to your message list.
Extensible library for building notifications and sending them via different delivery channels.
🔏 Stand-alone DKIM class to sign your emails with a 2048 bit private key hashed with SHA-256 algorithm.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
Checks for configured mail athentication methods like SPF, DKIM and DMARC
统计信息
- 总下载量: 1.11M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 45
- 点击次数: 25
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-11