Closed gunsuka closed 2 years ago
Sure: you can use the SPFLib\Check\Environment
class to do that.
You can also use a custom SPFLib\DNS\Resolver
class to emulate a TXT record for specific domains.
That is fantastic that the library can already do it. Is there any documentation or example? I looked through the code but I can't see anything that looks like I would be able to push an IP address and SPF record into the system.
No documentation.
You can use the SPFLib\Checker
class.
SPFLib\DNS\Resolver
instance that provides the TXT records for your domiains.check
method, use an SPFLib\Check\Environment
containing the IP address you want.
Is there any way to use this library by supplying the IP, and SPF record to see if it is a valid IP according to the SPF record I provide?
Currently you can supply the IP & domain name and it will lookup the TXT record in DNS.
I would like to supply my own starting TXT record and an associated IP address. Then the system could perform its checks. Possible?