PHP 8.5.0 Alpha 4 available for testing

Voting

: min(five, eight)?
(Example: nine)

The Note You're Voting On

cox at idecnet dot com
20 years ago
For doing basic RBL (Real Time Blacklist) lookups with this function do:

<?php
$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";
}
?>

Tomas V.V.Cox

<< Back to user notes page

To Top