src/FS/File/Log/Tracker/ShortReader.php
public function getBrowsers()
	{
		if( !$this->_open )
		{
			trigger_error( "Log File not read", E_USER_ERROR );
			return array();
		}
		$remote_addrs	= array();	
		$browsers		= array();
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip && $entry['http_user_agent'] )
			{
				if( isset( $remote_addrs[$entry['remote_addr']] ) )
				{
					if( $remote_addrs[$entry['remote_addr']] < $entry['timestamp'] - 30 * 60 )
					{
						if( isset( $browsers[$entry['http_user_agent']] ) )
							$browsers[$entry['http_user_agent']] ++;
						else
							$browsers[$entry['http_user_agent']]	= 1;
					}
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
				else
				{
					if( isset( $browsers[$entry['http_user_agent']] ) )
						$browsers[$entry['http_user_agent']] ++;
					else
						$browsers[$entry['http_user_agent']]	= 1;
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
			}
		}
		arsort( $browsers );
		$lines	= array();
		foreach( $browsers as $browser => $count )
			$lines[]	= "<tr><td>".$browser."</td><td>".$count."</td></tr>";
		$lines		= implode( "\n\t", $lines );
		$content	= "<table>".$lines."</table>";
		return $content;
	}
public function getBrowsers()
	{
		if( !$this->_open )
		{
			trigger_error( "Log File not read", E_USER_ERROR );
			return array();
		}
		$remote_addrs	= array();	
		$browsers		= array();
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip && $entry['http_user_agent'] )
			{
				if( isset( $remote_addrs[$entry['remote_addr']] ) )
				{
					if( $remote_addrs[$entry['remote_addr']] < $entry['timestamp'] - 30 * 60 )
					{
						if( isset( $browsers[$entry['http_user_agent']] ) )
							$browsers[$entry['http_user_agent']] ++;
						else
							$browsers[$entry['http_user_agent']]	= 1;
					}
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
				else
				{
					if( isset( $browsers[$entry['http_user_agent']] ) )
						$browsers[$entry['http_user_agent']] ++;
					else
						$browsers[$entry['http_user_agent']]	= 1;
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
			}
		}
		arsort( $browsers );
		$lines	= array();
		foreach( $browsers as $browser => $count )
			$lines[]	= "<tr><td>".$browser."</td><td>".$count."</td></tr>";
		$lines		= implode( "\n\t", $lines );
		$content	= "<table>".$lines."</table>";
		return $content;
	}
public function getBrowsers ( ) { if ( ! $ this -> _open ) { trigger_error ( "Log File not read" , E_USER_ERROR ) ; return array ( ) ; } $ remote_addrs = array ( ) ; $ browsers = array ( ) ; foreach ( $ this -> data as $ entry ) { if ( $ entry [ 'remote_addr' ] != $ this -> skip && $ entry [ 'http_user_agent' ] ) { if ( isset ( $ remote_addrs [ $ entry [ 'remote_addr' ] ] ) ) { if ( $ remote_addrs [ $ entry [ 'remote_addr' ] ] < $ entry [ 'timestamp' ] - 30 * 60 ) { if ( isset ( $ browsers [ $ entry [ 'http_user_agent' ] ] ) ) $ browsers [ $ entry [ 'http_user_agent' ] ] ++ ; else $ browsers [ $ entry [ 'http_user_agent' ] ] = 1 ; } $ remote_addrs [ $ entry [ 'remote_addr' ] ] = $ entry [ 'timestamp' ] ; } else { if ( isset ( $ browsers [ $ entry [ 'http_user_agent' ] ] ) ) $ browsers [ $ entry [ 'http_user_agent' ] ] ++ ; else $ browsers [ $ entry [ 'http_user_agent' ] ] = 1 ; $ remote_addrs [ $ entry [ 'remote_addr' ] ] = $ entry [ 'timestamp' ] ; } } } arsort ( $ browsers ) ; $ lines = array ( ) ; foreach ( $ browsers as $ browser => $ count ) $ lines [ ] = "<tr><td>" . $ browser . "</td><td>" . $ count . "</td></tr>" ; $ lines = implode ( "\n\t" , $ lines ) ; $ content = "<table>" . $ lines . "</table>" ; return $ content ; }
Returns used Browsers of unique Visitors.
@access		public
@return 	array
Returns used Browsers of unique Visitors .