cloudflare visitor ip
-
Please, replace this at kaya-login-notification\lib\functions.php with
`/** * Get the IP address of the client. * * @since 1.2.0 * * @return string */ if (!function_exists('wpkln_getClientIP')) { function wpkln_getClientIP() { //cloudflare ip if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && filter_var($_SERVER['HTTP_CF_CONNECTING_IP'], FILTER_VALIDATE_IP)) { $clientIP = $_SERVER['HTTP_CF_CONNECTING_IP']; } //cloudflare ip elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $clientIP = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (!empty($_SERVER['HTTP_CLIENT_IP'])) { $clientIP = $_SERVER['HTTP_CLIENT_IP']; } else { $clientIP = $_SERVER['REMOTE_ADDR']; } return (filter_var($clientIP, FILTER_VALIDATE_IP) ? $clientIP : ''); } }`
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘cloudflare visitor ip’ is closed to new replies.