Php checkdnsrr function returns incorrect result for blacklist search

148 Views Asked by At

I have a function that checking if IP in known blacklists and it returning incorrect data.

  $ip = '185.91.153.27';
  $host = 'zen.spamhaus.org';
  $reverse_ip = implode(".", array_reverse(explode(".", $ip)));
  if (checkdnsrr($reverse_ip . "." . $host . ".", "A")) {
     return true;
  }
  return false;

It retruns true but in spamhaus website it shows that ip isn't in blacklist. What's wrong with this method or does exists any other solutions?

0

There are 0 best solutions below