Stats
extends StatsLibrary
in package
Stats
Class with different methodes to get statistical information about webaccess
Tags
Table of Contents
Properties
- $_objTpl : mixed
- $arrBrowsers : mixed
- $arrClient : mixed
- $arrColourDefinitions : mixed
- $arrColourDepths : mixed
- $arrConfig : mixed
- $arrCountries : mixed
- $arrCountryNames : mixed
- $arrHostnames : mixed
- $arrIndexedPages : mixed
- $arrLastReferer : mixed
- $arrMostViewedPages : mixed
- $arrOperatingSystems : mixed
- $arrProxy : mixed
- $arrRequests : mixed
- $arrScreenResolutions : mixed
- $arrSearchTerms : mixed
- $arrSpiders : mixed
- $arrSupportJavaScript : mixed
- $arrTopReferer : mixed
- $arrVisitors : mixed
- $arrVisitorsDetails : mixed
- $browserSum : mixed
- $colourDepthSum : mixed
- $countriesSum : mixed
- $currentTime : mixed
- $hostnamesSum : mixed
- $md5Id : mixed
- $mostViewedPagesSum : mixed
- $operatingSystemsSum : mixed
- $pageTitle : mixed
- $pagingLimit : mixed
- $pagingLimitVisitorDetails : mixed
- $screenResolutionSum : mixed
- $spiderAgent : mixed
- $strErrMessage : mixed
- $strOkMessage : mixed
- $supportJavaScriptSum : mixed
- $totalRequests : mixed
- $totalVisitors : mixed
- $cx : object
- Instance of cloudrexx
- $act : mixed
Methods
- __construct() : mixed
- constructor
- _countSpider() : bool
- count every spider visit
- _deleteStatistics() : mixed
- _getClientInfos() : bool
- Get client informations
- _getProxyInformations() : mixed
- Get proxy informations
- _getRequestedUrl() : mixed
- Get requested page
- _initClientStatistics() : mixed
- _initConfiguration() : mixed
- Initialize the configuration for the counter and statistics
- _initMostViewedPages() : mixed
- _initReferer() : mixed
- Init referer
- _initSearchTerms() : mixed
- _initSpiders() : mixed
- _initStatisticsDays() : mixed
- _initStatisticsMonths() : mixed
- _initStatisticsToday() : mixed
- Initialize today statistics
- _initStatisticsYears() : mixed
- _initVisitorDetails() : mixed
- _makePercentBar() : string
- return the image with the procentualy width or height
- _removeOutdatedEntries() : mixed
- Remove outdated entries
- _saveSettings() : mixed
- Save settings
- _showClients() : mixed
- Show clients
- _showMostViewedPages() : mixed
- Show most viewed pages
- _showReferer() : mixed
- Show referer
- _showRequests() : mixed
- Show requests
- _showRequestsDays() : mixed
- Show requests days
- _showRequestsMonths() : mixed
- Show requests months
- _showRequestsToday() : mixed
- Show requests today
- _showRequestsYears() : mixed
- Show requests years
- _showSearchTerms() : mixed
- Show search terms
- _showSettings() : mixed
- Show settings
- _showSpiders() : mixed
- Show spiders
- _showVisitorDetails() : mixed
- _xmlCountryEndTag() : mixed
- end element handler of the xml country parser
- _xmlCountryStartTag() : mixed
- start element handler of the xml country parser
- checkForSpider() : mixed
- Check if the user agent is a spider
- getClientIp() : string
- Get the HTTP client's IP address
- getContent() : mixed
- Get the content of the requested page
- getCounterTag() : string
- Creates the tag to call the counter
- getOnlineUsers() : int
- Get online users
- getUniqueUserId() : unique
- Get unique user id
- getVisitorNumber() : mixed
- Get visitor number
- getChartJavascriptBy() : string
- Get javascript code for the jqplot chart.
- getStatsDataBy() : array<string|int, mixed>
- Get hourly statistics data.
- getStatsDataSummaryBy() : array<string|int, mixed>
- Get visitors and requests data.
- getStatsRangeBy() : array<string|int, mixed>
- Get statistics range by parameter.
- setNavigation() : mixed
- showVisitors() : mixed
Properties
$_objTpl
public
mixed
$_objTpl
$arrBrowsers
public
mixed
$arrBrowsers
= array()
$arrClient
public
mixed
$arrClient
= array()
$arrColourDefinitions
public
mixed
$arrColourDefinitions
= array('1' => 'TXT_MONOCHROME', '2' => 'TXT_CGA', '4' => 'TXT_VGA', '8' => 'TXT_SVGA', '15' => 'TXT_HIGH_COLOR', '16' => 'TXT_HIGH_COLOR', '24' => 'TXT_TRUE_COLOR', '32' => 'TXT_TRUE_COLOR_WITH_ALPHA_CHANNEL')
$arrColourDepths
public
mixed
$arrColourDepths
= array()
$arrConfig
public
mixed
$arrConfig
= array()
$arrCountries
public
mixed
$arrCountries
= array()
$arrCountryNames
public
mixed
$arrCountryNames
= array()
$arrHostnames
public
mixed
$arrHostnames
= array()
$arrIndexedPages
public
mixed
$arrIndexedPages
= array()
$arrLastReferer
public
mixed
$arrLastReferer
= array()
$arrMostViewedPages
public
mixed
$arrMostViewedPages
= array()
$arrOperatingSystems
public
mixed
$arrOperatingSystems
= array()
$arrProxy
public
mixed
$arrProxy
= array()
$arrRequests
public
mixed
$arrRequests
= array()
$arrScreenResolutions
public
mixed
$arrScreenResolutions
= array()
$arrSearchTerms
public
mixed
$arrSearchTerms
= array()
$arrSpiders
public
mixed
$arrSpiders
= array()
$arrSupportJavaScript
public
mixed
$arrSupportJavaScript
= array()
$arrTopReferer
public
mixed
$arrTopReferer
= array()
$arrVisitors
public
mixed
$arrVisitors
= array()
$arrVisitorsDetails
public
mixed
$arrVisitorsDetails
= array()
$browserSum
public
mixed
$browserSum
= 0
$colourDepthSum
public
mixed
$colourDepthSum
= 0
$countriesSum
public
mixed
$countriesSum
= 0
$currentTime
public
mixed
$currentTime
= 0
$hostnamesSum
public
mixed
$hostnamesSum
= 0
$md5Id
public
mixed
$md5Id
= 0
$mostViewedPagesSum
public
mixed
$mostViewedPagesSum
= 0
$operatingSystemsSum
public
mixed
$operatingSystemsSum
= 0
$pageTitle
public
mixed
$pageTitle
$pagingLimit
public
mixed
$pagingLimit
= ""
$pagingLimitVisitorDetails
public
mixed
$pagingLimitVisitorDetails
= ""
$screenResolutionSum
public
mixed
$screenResolutionSum
= 0
$spiderAgent
public
mixed
$spiderAgent
= false
$strErrMessage
public
mixed
$strErrMessage
= ''
$strOkMessage
public
mixed
$strOkMessage
= ''
$supportJavaScriptSum
public
mixed
$supportJavaScriptSum
= 0
$totalRequests
public
mixed
$totalRequests
= 0
$totalVisitors
public
mixed
$totalVisitors
= 0
$cx
Instance of cloudrexx
protected
object
$cx
\Cx\Core\Core\Controller\Cx
$act
private
mixed
$act
= ''
Methods
__construct()
constructor
public
__construct() : mixed
global \Cx\Core\Html\Sigma global array
_countSpider()
count every spider visit
public
_countSpider(mixed $useragent) : bool
Parameters
- $useragent : mixed
Tags
Return values
bool —result
_deleteStatistics()
public
_deleteStatistics() : mixed
_getClientInfos()
Get client informations
public
_getClientInfos() : bool
Get the clientinfos like useragent, langugage, ip, proxy, host and referer
Tags
Return values
bool —result
_getProxyInformations()
Get proxy informations
public
_getProxyInformations() : mixed
Collect proxy information, if available
_getRequestedUrl()
Get requested page
public
_getRequestedUrl() : mixed
Get the requested page from the $_GET vars. If a session has started, this var will be blocked and not in the uri
_initClientStatistics()
public
_initClientStatistics() : mixed
_initConfiguration()
Initialize the configuration for the counter and statistics
public
_initConfiguration() : mixed
Tags
_initMostViewedPages()
public
_initMostViewedPages() : mixed
_initReferer()
Init referer
public
_initReferer() : mixed
Initialize the referer statistics
Tags
_initSearchTerms()
public
_initSearchTerms() : mixed
_initSpiders()
public
_initSpiders() : mixed
_initStatisticsDays()
public
_initStatisticsDays() : mixed
_initStatisticsMonths()
public
_initStatisticsMonths() : mixed
_initStatisticsToday()
Initialize today statistics
public
_initStatisticsToday() : mixed
Initialize the visitor and request statistics from today
Tags
_initStatisticsYears()
public
_initStatisticsYears() : mixed
_initVisitorDetails()
public
_initVisitorDetails() : mixed
_makePercentBar()
return the image with the procentualy width or height
public
_makePercentBar(float $maxWidth, float $maxHeight, float $percWidth, float $percHeight, mixed $gif[, string $title = '' ]) : string
Parameters
- $maxWidth : float
-
width if the image is 100% in widht
- $maxHeight : float
-
height if the image is 100% in height
- $percWidth : float
-
procentualy width
- $percHeight : float
-
procentualy height
- $gif : mixed
- $title : string = ''
-
title and alternative text
Return values
string —the path to the image with procentualy width and height
_removeOutdatedEntries()
Remove outdated entries
public
_removeOutdatedEntries() : mixed
Remove outdated entries of the database
Tags
_saveSettings()
Save settings
public
_saveSettings() : mixed
Save the statistic settings
Tags
_showClients()
Show clients
public
_showClients() : mixed
Show the statistics of the clients browser, operating system, javascript support, screen resolution and the colour depth
Tags
_showMostViewedPages()
Show most viewed pages
public
_showMostViewedPages() : mixed
Show a list of the most viewed pages
Tags
_showReferer()
Show referer
public
_showReferer() : mixed
Show the last referers and the most referers
Tags
_showRequests()
Show requests
public
_showRequests() : mixed
Show the request statistics
Tags
_showRequestsDays()
Show requests days
public
_showRequestsDays() : mixed
Show the page requests and visitors of the days
Tags
_showRequestsMonths()
Show requests months
public
_showRequestsMonths() : mixed
Show the page requests and visitors of the months
Tags
_showRequestsToday()
Show requests today
public
_showRequestsToday() : mixed
Show the page requests and visitors of today
Tags
_showRequestsYears()
Show requests years
public
_showRequestsYears() : mixed
Show the page requests and visitors of the years
Tags
_showSearchTerms()
Show search terms
public
_showSearchTerms() : mixed
Show the statistic of the search queries
Tags
_showSettings()
Show settings
public
_showSettings() : mixed
Show the settings page
Tags
_showSpiders()
Show spiders
public
_showSpiders() : mixed
Show a top list of the spiders that have indexed this webpage and a list of all websites that have been indexed by a spider
Tags
_showVisitorDetails()
public
_showVisitorDetails() : mixed
_xmlCountryEndTag()
end element handler of the xml country parser
public
_xmlCountryEndTag(mixed $parser, mixed $name) : mixed
Parameters
- $parser : mixed
- $name : mixed
Tags
_xmlCountryStartTag()
start element handler of the xml country parser
public
_xmlCountryStartTag(mixed $parser, mixed $name, mixed $attrs) : mixed
Parameters
- $parser : mixed
- $name : mixed
- $attrs : mixed
Tags
checkForSpider()
Check if the user agent is a spider
public
checkForSpider() : mixed
getClientIp()
Get the HTTP client's IP address
public
getClientIp() : string
IMPORTANT: Do not store the return value of this method in order to comply with the data privacy act GDPR! In case the client is connecting through a proxy, this method will try the fetch the client's original IP address and will return that one instead of the proxy's IP address.
Return values
string —IP address of client
getContent()
Get the content of the requested page
public
getContent() : mixed
Tags
Return values
mixed —Template content
getCounterTag()
Creates the tag to call the counter
public
getCounterTag() : string
Tags
Return values
string —$counterTag The counter tag
getOnlineUsers()
Get online users
public
getOnlineUsers() : int
Get the number of the online users
Tags
Return values
int —$onlineUsers
getUniqueUserId()
Get unique user id
public
getUniqueUserId() : unique
Return values
unique —user id as md5-string
getVisitorNumber()
Get visitor number
public
getVisitorNumber() : mixed
Get the number of the current visitor
Tags
Return values
mixed —visitor number on success, false on failure
getChartJavascriptBy()
Get javascript code for the jqplot chart.
protected
getChartJavascriptBy(string $id, array<string|int, mixed> $data[, mixed $renderer = '' ]) : string
Parameters
- $id : string
- $data : array<string|int, mixed>
- $renderer : mixed = ''
Return values
string —$code
getStatsDataBy()
Get hourly statistics data.
protected
getStatsDataBy(string $param) : array<string|int, mixed>
Parameters
- $param : string
-
(hour, day, month or year)
Return values
array<string|int, mixed> —array(ticks, dates, visitors, requests)
getStatsDataSummaryBy()
Get visitors and requests data.
private
getStatsDataSummaryBy(string $param) : array<string|int, mixed>
Parameters
- $param : string
-
(hour, day, month or year)
Return values
array<string|int, mixed> —array(visitors, requests)
getStatsRangeBy()
Get statistics range by parameter.
private
getStatsRangeBy(string $param) : array<string|int, mixed>
Parameters
- $param : string
-
(hour, day, month or year)
Return values
array<string|int, mixed> —$arrRange
setNavigation()
private
setNavigation() : mixed
showVisitors()
private
showVisitors() : mixed