File/libraries/lib-log.inc.php

Description
Includes
 require_once (phpAds_path.'/libraries/other/phpSniff/phpSniff.class.php') (line 37)
 require_once (phpAds_path.'/libraries/lib-db.inc.php') (line 36)
 require_once (phpAds_path.'/libraries/db.php') (line 35)
Functions
logAdClick (line 98)

A function to log an ad click.

In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.

void logAdClick (integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
  • integer $viewerId: The viewer ID (was userid).
  • integer $adId: The advertisement ID (was bannerid).
  • integer $creativeId: The creative ID (doesn't exist yet, use null).
  • integer $zoneId: The zone ID.
logAdImpression (line 75)

A function to log an ad impression.

In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.

void logAdImpression (integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
  • integer $viewerId: The viewer ID (was userid).
  • integer $adId: The advertisement ID (was bannerid).
  • integer $creativeId: The creative ID (doesn't exist yet, use null).
  • integer $zoneId: The zone ID.
logAdRequest (line 52)

A function to log an ad requests.

In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.

void logAdRequest (integer $viewerId, integer $adId, integer $creativeId, integer $zoneId)
  • integer $viewerId: The viewer ID (was userid).
  • integer $adId: The advertisement ID (was bannerid).
  • integer $creativeId: The creative ID (doesn't exist yet, use null).
  • integer $zoneId: The zone ID.
logBenchmark (line 318)

A function to log benchmarking data to a file.

A file called "debug.log" is created in the cache directory to store this information.

void logBenchmark (string $page, string $queryString, double $benchmark, [string $extra = ''])
  • string $page: The name of the script being benchmarked.
  • string $queryString: The query string parameters passed to the page.
  • double $benchmark: The elapsed time of the benchmark.
  • string $extra: Any extra information to be logged.
logTrackerClick (line 250)

A function to log a tracker click.

In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.

void logTrackerClick (integer $viewerId, integer $trackerId)
  • integer $viewerId: The viewer ID (was userid).
  • integer $trackerId: The tracker ID.
logTrackerImpression (line 126)

A function to log a tracker impression.

In order for the browser and operating system information to be correctly logged, PHP must be set up correctly to utilise an up to date browscap.ini file: see http://www.php.net/manual/en/ref.misc.php#ini.browscap.

Note that the $phpAds_config['rawDbhost'] variable will only be defined in the event that Max is configured for multiple databases. Normally, this will not be the case, so the server_ip field will be blank.

  • return: An array containing the server_raw_tracker_impression_id and the server_raw_ip values, if the tracker impression was inserted, false otherwise.
mixed logTrackerImpression (integer $viewerId, integer $trackerId)
  • integer $viewerId: The viewer ID (was userid).
  • integer $trackerId: The tracker ID.
logVariableValues (line 203)

A function to log a tracker impression variable values.

Note that the $phpAds_config['rawDbhost'] variable will only be defined in the event that Max is configured for multiple databases. Normally, this will not be the case, so the server_ip field will be blank.

void logVariableValues (integer $trackerId, integer $serverRawTrackerImpressionId, string $serverRawIp)
  • integer $trackerId: The tracker ID.
  • integer $serverRawTrackerImpressionId: The unique tracker impression id on the raw database server.
  • string $serverRawIp: The IP address of the raw database server, or null if Max is not running in multiple database server mode.
_insert (line 441)

A function to insert ad requests, ad impressions, ad clicks and tracker clicks into the raw tables. Does NOT work with tracker impressions.

void _insert (string &$table, integer &$viewerId, integer &$adId, integer &$creativeId, integer &$zoneId, string &$country, array &$zoneInfo, array &$userAgentInfo, integer &$maxHttps)
  • string $table: A reference to the raw table name to insert into.
  • integer $viewerId: A reference to the viewer ID.
  • integer $adId: A reference to the advertisement ID.
  • integer $creativeId: A reference to the creative ID.
  • integer $zoneId: A reference to the zone ID.
  • string $country: A reference to a variable to hold the viewer's country code.
  • array $zoneInfo: A reference to an array to store information about the URL the viewer used to access the page containing the zone.
  • array $userAgentInfo: A reference to an array to store information about the viewer's web browser and operating system.
  • integer $maxHttps: A reference to an integer to store if the call to Max was performed using HTTPS or not.
_prepareLogInfo (line 378)

A function to get various information that needs to be logged.

void _prepareLogInfo (string &$country, array &$zoneInfo, array &$userAgentInfo, integer &$maxHttps)
  • string $country: A reference to a variable to hold the viewer's country code.
  • array $zoneInfo: A reference to an array to store information about the URL the viewer used to access the page containing the zone.
  • array $userAgentInfo: A reference to an array to store information about the viewer's web browser and operating system.
  • integer $maxHttps: A reference to an integer to store if the call to Max was performed using HTTPS or not.
_viewersHostOkayToLog (line 335)

A function to check if the information to be logged should be logged or ignored, on the basis of the viewer's IP address or hostname.

  • return: True if the information should be logged, or false if the host name is in the list of hosts to ignore log information for.
boolean _viewersHostOkayToLog ()

Documentation generated on Fri, 24 Dec 2004 13:02:28 +0000 by phpDocumentor 1.3.0RC3