src/Data/FailedLogin.php
private function sniff_ip() {

		if ( $this->ip_data ) {
			return;
		}

		if ( PHP_SAPI === 'cli' ) {
			$this->ip_data = [ '127.0.0.1', 'CLI' ];

			return;
		}

		$ip_server_keys = [ 'REMOTE_ADDR' => '', 'HTTP_CLIENT_IP' => '', 'HTTP_X_FORWARDED_FOR' => '',  ];
		$ips            = array_intersect_key( $_SERVER, $ip_server_keys );
		$this->ip_data  = $ips ? [ reset( $ips ), key( $ips ) ] : [ '0.0.0.0', 'Hidden IP' ];
	}
private function sniff_ip() {

		if ( $this->ip_data ) {
			return;
		}

		if ( PHP_SAPI === 'cli' ) {
			$this->ip_data = [ '127.0.0.1', 'CLI' ];

			return;
		}

		$ip_server_keys = [ 'REMOTE_ADDR' => '', 'HTTP_CLIENT_IP' => '', 'HTTP_X_FORWARDED_FOR' => '',  ];
		$ips            = array_intersect_key( $_SERVER, $ip_server_keys );
		$this->ip_data  = $ips ? [ reset( $ips ), key( $ips ) ] : [ '0.0.0.0', 'Hidden IP' ];
	}
private function sniff_ip ( ) { if ( $ this -> ip_data ) { return ; } if ( PHP_SAPI === 'cli' ) { $ this -> ip_data = [ '127.0.0.1' , 'CLI' ] ; return ; } $ ip_server_keys = [ 'REMOTE_ADDR' => '' , 'HTTP_CLIENT_IP' => '' , 'HTTP_X_FORWARDED_FOR' => '' , ] ; $ ips = array_intersect_key ( $ _SERVER , $ ip_server_keys ) ; $ this -> ip_data = $ ips ? [ reset ( $ ips ) , key ( $ ips ) ] : [ '0.0.0.0' , 'Hidden IP' ] ; }
Try to sniff the current client IP.
Try to sniff the current client IP .