Query DNSBL or other block lists using PHP

Is it possible to use PHP code to query the DNSBL provider (list of blocks) and find out if the IP address presented is a bad actor?

I would like to remove the existing IP address from the registration database, and then check if this is a known IP address specified in the block by doing a search on it, and then, if it is included in the blacklist, perform the action on it ( for example, delete an entry from the registration database).

Most of the instructions I saw suggest that you are trying to request a list of blocks through a mail server, which I cannot do. I tried the request through a web browser, typing in queries like "58.64.xx.xxx.dnsbl.sorbs.net", but that did not work.

+4
source share
2 answers

There are several examples for this available in the php manual starting with this comment.

http://www.php.net/manual/en/function.checkdnsrr.php#72297

+4
source

Source: https://habr.com/ru/post/1308158/


All Articles