idevelopment / service_status

Network and Service status page for all iDevelopment services.
2 stars 1 forks source link

DNS blacklist #19

Open ghermans opened 8 years ago

ghermans commented 8 years ago

Allow users to check if the IP adress is blocked.

Tjoosten commented 8 years ago

@ghermans any package for this?

ghermans commented 8 years ago

This can be done by php pear Net_DNSBL.

https://pear.php.net/manual/en/package.networking.net-dnsbl.intro.php

  $host = "";
  $surbl = new Net_DNSBL_SURBL();
  $dnsbl->setBlacklists(array('dnsbl.sorbs.net', 'zen.spamhaus.org'));
  if ($surbl->isListed($url))
    return false;
  reuturn true;