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"; } } ?> Link to comment https://forums.phpfreaks.com/topic/162540-array-problem-with-script-using-pear-net_dnsbl/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.