You are here

private function Firewall::ipGet in Anti Spam by CleanTalk 8.4

Same name and namespace in other branches
  1. 9.1.x src/lib/Cleantalk/Common/Firewall/Firewall.php \Cleantalk\Common\Firewall\Firewall::ipGet()

Getting arrays of IP (REMOTE_ADDR, X-Forwarded-For, X-Real-Ip, Cf_Connecting_Ip)

Parameters

string $ips_input type of IP you want to receive:

bool $v4_only:

Return value

array

1 call to Firewall::ipGet()
Firewall::__construct in src/lib/Cleantalk/Common/Firewall/Firewall.php
Creates Database driver instance.

File

src/lib/Cleantalk/Common/Firewall/Firewall.php, line 293

Class

Firewall

Namespace

Cleantalk\Common\Firewall

Code

private function ipGet($ips_input, $v4_only = true) {
  $result = Helper::ip__get($ips_input, $v4_only);
  return !empty($result) ? array(
    'real' => $result,
  ) : array();
}