Phpxforms documentation

Tracer
in package

Simple user tracer can be used via javascript or/and php (fewer features)

Tags
author

DaVee

version
0.87dev
license

Lesser General Public License 2.1 or later; see http://www.gnu.org/licenses/lgpl-2.1.html

Table of Contents

Properties

$cookie  : string
$life  : int
$timeout  : int
$db  : SQL
$id  : int|null
$path  : string

Methods

__construct()  : mixed
createTrace()  : void
Save visitor page interaction tracing information
creteVisitAjax()  : int
Save view from javascript
creteVisitLocal()  : int
Save view from noscript
getBrowser()  : array<string|int, string|int>|string|null
Get browser info from agent
getResponseCode()  : mixed
Get url response code
getSystem()  : array<string|int, string|int>|string|null
Get system info from agent
isMobile()  : bool
Is mobile client
script()  : void
Print tracking javascript
updateVisitor()  : void
createVisit()  : int
Save page view
createVisitor()  : int
Create new visitor with basic information about browser and system
getDomain()  : string
loadVisitor()  : int|null
Get visitor ID based on given hash
makeHash()  : string
Make unique hash
setVisitorHash()  : void
Creates unique hash for visitor

Properties

public static string $cookie = 'pfxvistr'

$life

public static int $life = 2592000

$timeout

public static int $timeout = 3600

Methods

__construct()

public __construct(SQL $db[, string $path = '/' ][, string|null $page = null ]) : mixed
Parameters
$db : SQL
$path : string = '/'
$page : string|null = null

createTrace()

Save visitor page interaction tracing information

public createTrace(mixed|int $visitId, mixed|float $trace, mixed|float $width, mixed|float $height, mixed|float $active, mixed|int $time) : void
Parameters
$visitId : mixed|int
$trace : mixed|float
$width : mixed|float
$height : mixed|float
$active : mixed|float
$time : mixed|int

creteVisitAjax()

Save view from javascript

public creteVisitAjax(string $inRef, string $inReq) : int
Parameters
$inRef : string
$inReq : string
Return values
int

creteVisitLocal()

Save view from noscript

public creteVisitLocal() : int
Return values
int

getBrowser()

Get browser info from agent

public static getBrowser(string $agent) : array<string|int, string|int>|string|null
Parameters
$agent : string
Return values
array<string|int, string|int>|string|null

getResponseCode()

Get url response code

public static getResponseCode(string $fullUrl) : mixed
Parameters
$fullUrl : string

getSystem()

Get system info from agent

public static getSystem(string $agent) : array<string|int, string|int>|string|null
Parameters
$agent : string
Return values
array<string|int, string|int>|string|null

isMobile()

Is mobile client

public static isMobile(string $agent) : bool
Parameters
$agent : string
Return values
bool

script()

Print tracking javascript

public static script([array<string, string|int> $settings = [] ]) : void
Parameters
$settings : array<string, string|int> = []

updateVisitor()

public updateVisitor(mixed|float $width, mixed|float $height, mixed|float $ratio) : void
Parameters
$width : mixed|float
$height : mixed|float
$ratio : mixed|float

createVisit()

Save page view

protected createVisit(string $request, string $referer, string|int $status) : int
Parameters
$request : string
$referer : string
$status : string|int
Return values
int

createVisitor()

Create new visitor with basic information about browser and system

protected createVisitor() : int
Return values
int

getDomain()

protected getDomain() : string
Return values
string

loadVisitor()

Get visitor ID based on given hash

protected loadVisitor(string $mark) : int|null
Parameters
$mark : string
Return values
int|null

makeHash()

Make unique hash

protected makeHash(int $id) : string
Parameters
$id : int
Return values
string

setVisitorHash()

Creates unique hash for visitor

protected setVisitorHash(int $id) : void
Parameters
$id : int

        
On this page

Search results