On Sunday, July 18, 2004, 3:40:22 AM, Shashank Tripathi wrote:
I am looking for some simple PHP based functionality that will allow me to query the SURBL database for a domain name and confirm if it is a spamvertised one or not. Is there any engine for this?
I would like this functionality on hosted domains as well, which means setting up a DNS resolution etc may be impractical.
All I need is some online location to which I can send an input (a URL, or just the domain name) and get back a "YES" or a "NO" indicating whether this domain name is clean or not.
Wouldn't dns_get_record() in PHP, specifically the DNS_A option resolve domains?
http://us2.php.net/manual/en/function.dns-get-record.php
For example:
<?php $result = dns_get_record("domainundertest.com.multi.surbl.org", DNS_A); print_r($result); ?>
Would query domainundertest.com in multi.surbl.org and return an A record if the domain is listed, or none if it's not.
One drawback noted on the manual page above:
"This function is not implemented on Windows platforms. Try the PEAR class Net_DNS."
But presumably that class has similar capabilities.
Remember that like other RBLs, the SURBL data is in the form of DNS records, so all that's needed to look up the data is name resolution.
Jeff C.