You are here

public static function HttpblEvaluator::_httpbl_reverse_ip in http:BL 8

Reverse IP octets

Parameters

string $ip:

Return value

string

1 call to HttpblEvaluator::_httpbl_reverse_ip()
HttpblEvaluator::httpbl_dnslookup in src/HttpblEvaluator.php
Do http:BL DNS lookup at Project Honeypot Org

File

src/HttpblEvaluator.php, line 378

Class

HttpblEvaluator
HttpblEvaluator evaluates visitor/host page requests.

Namespace

Drupal\httpbl

Code

public static function _httpbl_reverse_ip($ip) {
  if (!is_numeric(str_replace('.', '', $ip))) {
    return NULL;
  }
  $ip = explode('.', $ip);
  if (count($ip) != 4) {
    return NULL;
  }
  return $ip[3] . '.' . $ip[2] . '.' . $ip[1] . '.' . $ip[0];
}