Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/publish/log.php - 128 lines - 3374 bytes - Source - Print

Description: Log visitors.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

log_hit()
logit()
insert_logit()

Functions

Functions that are not part of a class:

log_hit($status line: 30
Adds a row to the visitor logs.

This function follows the site's logging preferences. If $logging preference
is set to 'refer', only referrer hits are logged. If $logging is set to
'none' or '$nolog' global to TRUE, the function will ignore all hits.

If the $status parameter is set to 404, the hit isn't logged.

param: int $status HTTP status code
logit($r = '', $status = 200)  line: 58
Writes a record to the visitor log using the current visitor's information.

This function is used by log_hit(). See it before trying to use this one.

The hit is ignore if $r is set to 'refer' and the HTTP REFERER header
is empty.

param: string $r      Type of record to write, e.g. refer
param: int    $status HTTP status code
insert_logit($in line: 113
Inserts a log record into the database.

param: array $in Input array consisting 'uri', 'ref', 'status', 'method'

title

Body