Documentation

StatsLibrary

Stats Library

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Cloudrexx Development Team info@cloudrexx.com

version
1.0
subpackage

coremodule_stats

Table of Contents

Properties

$arrBrowsers  : mixed
$arrClient  : 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
$pagingLimit  : mixed
$pagingLimitVisitorDetails  : mixed
$screenResolutionSum  : mixed
$spiderAgent  : mixed
$supportJavaScriptSum  : mixed
$totalRequests  : mixed
$totalVisitors  : mixed
$cx  : object
Instance of cloudrexx

Methods

__construct()  : mixed
_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
checkForSpider()  : mixed
Check if the user agent is a spider
getClientIp()  : string
Get the HTTP client's IP address
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.

Properties

Methods

_countSpider()

count every spider visit

public _countSpider(mixed $useragent) : bool
Parameters
$useragent : mixed
Tags
global

ADONewConnection

integer

Return values
bool —

result

_getClientInfos()

Get client informations

public _getClientInfos() : bool

Get the clientinfos like useragent, langugage, ip, proxy, host and referer

Tags
see
_getProxyInformations()
_getReferer()
_checkForSpider()
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

_initConfiguration()

Initialize the configuration for the counter and statistics

public _initConfiguration() : mixed
Tags
global

ADONewConnection

_initReferer()

Init referer

public _initReferer() : mixed

Initialize the referer statistics

Tags
access

private

global

ADONewConnection

_initStatisticsToday()

Initialize today statistics

public _initStatisticsToday() : mixed

Initialize the visitor and request statistics from today

Tags
access

private

global

ADONewConnection

see
_removeOutdatedEntries()

_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
global

ADONewConnection

_saveSettings()

Save settings

public _saveSettings() : mixed

Save the statistic settings

Tags
access

private

global

ADONewConnection

see
_initConfiguration()

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

getCounterTag()

Creates the tag to call the counter

public getCounterTag() : string
Tags
access

public

global

integer $pageId

Return values
string —

$counterTag The counter tag

getOnlineUsers()

Get online users

public getOnlineUsers() : int

Get the number of the online users

Tags
access

public

global

ADONewConnection

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
access

public

global

ADONewConnection

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

On this page

Search results