First of all, you will need to install PEAR::Net_DNSBL as command below,
pear install NET_DNSBL
By referring to the sample script from PEAR::Net_DNSBL manual, I have modified the script to be able to send an email to me when found any IPs range that needed by me as below,
With the above script, I am designing for block /24 IP range, if you need to check certain IP, replace the $ip to the exact IP and remove the for loop from line 7 and 20.
Lastly, you may add on the RBL List to the array if needed. Enjoy 🙂