 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
al
Joined: 17 Jun 2009 Posts: 1
|
Posted: Wed Jun 17, 2009 1:51 pm Post subject: Array problem with script using PEAR Net_DNSBL |
|
|
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
| Code: |
<?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";
}
}
?>
|
|
|
| Back to top |
|
 |
johncocyan09
Joined: 15 Jan 2010 Posts: 3
|
Posted: Fri Jan 15, 2010 3:17 pm Post subject: Good work ! |
|
|
thanks for posting the wonderful script, I think it would work very fine, i hope. I am also looking forward for its success. _________________ CUBAN CIGARS |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|