al Posted June 17, 2009 Share Posted June 17, 2009 I'm writting simple script to test my mail server if it's listed in any of DNSBL servers and I can't get around array problem when calling $dnsbl->getDetails($serverIP). It keeps adding array result line from previous server query in front of new one. In real situation DNSBL servers are pulled from MySQL. All opinions are welcome <?php // PEAR Net_DNSBL require_once 'Net/DNSBL.php'; $dnsbl = new Net_DNSBL(); // Test IP $serverIP = "127.0.0.2"; // Initialize $rbl = $dnsbl->setBlacklists(array('b.barracudacentral.org','bl.ahbl.org')); // Rotate from start to end while ($rbl){ // Query DNSBL servers if IP is listed if ($dnsbl->isListed($serverIP)) { // Query for details $detail = $dnsbl->getDetails($serverIP); // Get details out echo "<pre>"; print_r($detail); echo "</pre>"; } else { echo "NOT LISTED"; } } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.