问题
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