2011-01-14 migrated from rBlogger.2009 Work_仕事 Programming_開発 PHP For doing basic RBL (Real Time Blacklist) lookups with this function do: 1234567891011121314<?$host = '64.53.200.156';$rbl = 'sbl-xbl.spamhaus.org';// valid query format is: 156.200.53.64.sbl-xbl.spamhaus.org$rev = array_reverse(explode('.', $host));$lookup = implode('.', $rev) . '.' . $rbl;if ($lookup != gethostbyname($lookup)) { echo "ip: $host is listed in $rbl\n";} else { echo "ip: $host NOT listed in $rbl\n";}?> author: Richie Bartlett link: https://blog.RichieBartlett.com/Work_仕事/Programming_開発/PHP/PHP-BlackList-lookup/ copyright notice: All articles on this website, unless otherwise stated, adopt CC BY-NC-ND 4.0 reprint policy. If reproduced, please indicate source! Prev: PHP:: Telnet Next: PHP:: Finger Please enable JavaScript to view the comments powered by Disqus.