src/FS/File/Log/Tracker/Reader.php
public function getPagesPerVisitor()
	{
		$remote_addrs	= array();	
		$visitors		= array();
		$visitor		= 0;
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip )
			{
				if( isset( $remote_addrs[$entry['remote_addr']] ) )
				{
					if( $remote_addrs[$entry['remote_addr']] < $entry['timestamp'] - 30 * 60 )
					{
						$visitor++;
						$visitors[$visitor]	= 0;
					}
					$visitors[$visitor] ++;
				}
				else
				{
					$visitor++;
					$visitors[$visitor]	= 1;
					$remote_addrs[$entry['remote_addr']] = $entry['timestamp'];
				}
			}
		}
		$total	= 0;
		foreach( $visitors as $visitor => $pages )
			$total	+= $pages;
		$pages	= round( $total / count( $visitors ), 1 );
		return $pages;
	}
public function getPagesPerVisitor()
	{
		$remote_addrs	= array();	
		$visitors		= array();
		$visitor		= 0;
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip )
			{
				if( isset( $remote_addrs[$entry['remote_addr']] ) )
				{
					if( $remote_addrs[$entry['remote_addr']] < $entry['timestamp'] - 30 * 60 )
					{
						$visitor++;
						$visitors[$visitor]	= 0;
					}
					$visitors[$visitor] ++;
				}
				else
				{
					$visitor++;
					$visitors[$visitor]	= 1;
					$remote_addrs[$entry['remote_addr']] = $entry['timestamp'];
				}
			}
		}
		$total	= 0;
		foreach( $visitors as $visitor => $pages )
			$total	+= $pages;
		$pages	= round( $total / count( $visitors ), 1 );
		return $pages;
	}
public function getPagesPerVisitor ( ) { $ remote_addrs = array ( ) ; $ visitors = array ( ) ; $ visitor = 0 ; foreach ( $ this -> data as $ entry ) { if ( $ entry [ 'remote_addr' ] != $ this -> skip ) { if ( isset ( $ remote_addrs [ $ entry [ 'remote_addr' ] ] ) ) { if ( $ remote_addrs [ $ entry [ 'remote_addr' ] ] < $ entry [ 'timestamp' ] - 30 * 60 ) { $ visitor ++ ; $ visitors [ $ visitor ] = 0 ; } $ visitors [ $ visitor ] ++ ; } else { $ visitor ++ ; $ visitors [ $ visitor ] = 1 ; $ remote_addrs [ $ entry [ 'remote_addr' ] ] = $ entry [ 'timestamp' ] ; } } } $ total = 0 ; foreach ( $ visitors as $ visitor => $ pages ) $ total += $ pages ; $ pages = round ( $ total / count ( $ visitors ) , 1 ) ; return $ pages ; }
Calculates Page View Average of unique Visitors.
@access		public
@return 	float
Calculates Page View Average of unique Visitors .