@@ 54-61 (lines=8) @@ | ||
51 | preg_match_all('{(?<ipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)}s', $contents, $matches); |
|
52 | ||
53 | $onPageIpAddress = $matches['ipaddress']; |
|
54 | if (array_key_exists('static', self::$ipAddress)) { |
|
55 | $result = array_filter(self::$ipAddress['static'], function ($ipAddress) use ($onPageIpAddress) { |
|
56 | return in_array($ipAddress, $onPageIpAddress); |
|
57 | }); |
|
58 | if (count($result) !== 0) { |
|
59 | $existsIpAddress['static'][$pageUrl] = $result; |
|
60 | } |
|
61 | } |
|
62 | ||
63 | if (array_key_exists('regexp', self::$ipAddress)) { |
|
64 | $result = array_filter(self::$ipAddress['regexp'], function ($ipAddress) use ($onPageIpAddress) { |
|
@@ 63-70 (lines=8) @@ | ||
60 | } |
|
61 | } |
|
62 | ||
63 | if (array_key_exists('regexp', self::$ipAddress)) { |
|
64 | $result = array_filter(self::$ipAddress['regexp'], function ($ipAddress) use ($onPageIpAddress) { |
|
65 | return preg_grep($ipAddress, $onPageIpAddress); |
|
66 | }); |
|
67 | if (count($result) !== 0) { |
|
68 | $existsIpAddress['regexp'][$pageUrl] = $result; |
|
69 | } |
|
70 | } |
|
71 | usleep(500000); |
|
72 | } |
|
73 |