How to validate SPF records with PHP

房东的猫 提交于 2020-01-06 18:45:21

问题


I'm developing a web mailing app on Codeigniter PHP. I would like to know how to check SPF records are valid with PHP. Is there a PHP API to do this? This is so I can implement SPF within my mailing App to verify a user has authorized our servers via SPF DNS records to send mail.


回答1:


Look at the libraries here:

http://www.openspf.org/Implementations

None are in PHP, but they are in other languages, so if you get stuck creating a validator according to the publish standards, you can see how these other libraries handle it.




回答2:


Replying to an old question but it might be useful.

I found a PHP library on Github that does this, see it here: https://github.com/Mika56/PHP-SPF-Check



来源:https://stackoverflow.com/questions/36749957/how-to-validate-spf-records-with-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!