function fs_mediawiki_hit($wiki_object) { if (isset($_REQUEST['gen']) || isset($_REQUEST['ctype'])) { return true; } fs_add_site_hit(FS_SITE_ID); return true; }
function __firestats_hit() { $site_id = rss_plugins_get_option('firestats.id'); if (empty($site_id)) { $site_id = 0; } fs_add_site_hit($site_id, null, false); }
function firestats_joomla_add_hit() { if (function_exists('fs_add_site_hit')) { fs_add_site_hit(FS_SITE_ID); return true; } else { return false; } }
<?php require_once dirname(__FILE__) . '/db-hit.php'; $site_id = 0; if (!empty($GLOBALS['FS_SITE_ID'])) { $site_id = $GLOBALS['FS_SITE_ID']; } fs_add_site_hit($site_id);
function fs_add_wordpress() { $FS_PATH = fs_get_firestats_path(); if (!$FS_PATH) { return; } if (is_404()) { return; } // don't log 404. require_once $FS_PATH . '/php/db-hit.php'; $firestats_site_id = get_option('firestats_site_id'); // extract user ID in a wordpress specific method. global $user_ID; get_currentuserinfo(); // add with the user ID (or with null) fs_add_site_hit($firestats_site_id, $user_ID, false); }
/** This file is used to add hits data to firestats using post or get http requests. */ $ip = fs_get('IP'); $url = fs_get('URL'); $ref = fs_get('REF', true); $useragent = fs_get('USERAGENT'); $site_id = fs_get('SITE_ID'); $_SERVER['REMOTE_ADDR'] = $ip; $_SERVER['REQUEST_URI'] = $url; $_SERVER['HTTP_USER_AGENT'] = $useragent; $_SERVER['HTTP_REFERER'] = $ref; require_once dirname(__FILE__) . '/init.php'; require_once dirname(__FILE__) . '/db-hit.php'; fs_add_site_hit($site_id, null, true); function fs_get($k, $optional = false) { if (isset($_POST[$k])) { return $_POST[$k]; } else { if (isset($_GET[$k])) { return $_GET[$k]; } } if ($optional) { return ''; } else { die("Missing key : {$k}"); } }