Query DNSBL or other block lists using PHP
- by 55skidoo
Is there any way to use PHP code to query a DNSBL (block list) provider and find out if the IP address submitted is a bad actor?
I would like to take an existing IP address out of a registration database, then check whether it's a known block-listed IP address by performing a lookup on it, then if it's a blacklisted, do an action on it (such as, delete entry from registration database).
Most of the instructions I have seen assume you are trying to query the blocklist via a mail server, which I can't do. I tried querying via web browser by typing in queries such as "58.64.xx.xxx.dnsbl.sorbs.net" but that didn't work.