b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: conf ] [ index: conf ] [ all elements ]

Source for file _stats.php

Documentation is available at _stats.php

  1. <?php
  2. /**
  3.  * This is b2evolution's stats config file
  4.  *
  5.  * This file sets how b2evolution will log hits and stats
  6.  * Last significant changes to this file: version 0.9.0.11
  7.  *
  8.  * b2evolution - {@link http://b2evolution.net/}
  9.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  11.  *
  12.  * @package conf
  13.  */
  14. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  15.  
  16.  
  17. /**
  18.  * Blacklist: referrers that should be hidden in stats. This should typically include this
  19.  * site as well as stat services, online email services, online aggregators, etc.
  20.  *
  21.  * The following substrings will be looked up in the referer http header
  22.  * in order to identify referers to hide in the logs
  23.  *
  24.  * THIS IS NOT FOR SPAM! Use the Antispam features in the admin section to control spam!
  25.  *
  26.  * WARNING: you should *NOT* use a slash at the end of simple domain names, as
  27.  * older Netscape browsers will not send these. For example you should list
  28.  * http://www.example.com instead of http://www.example.com/ .
  29.  *
  30.  * @global array $blackList 
  31.  */
  32. $blackList array(
  33.     $baseurl,
  34.     'http://localhost',
  35.     'http://127.0.0.1',
  36.     // stat services
  37.     'sitemeter.com/',
  38.     // aggregators
  39.     'bloglines.com/',
  40.     // caches
  41.     '/search?q=cache:',        // Google cache
  42.     // redirectors
  43.     'googlealert.com/',
  44.     // add your own...
  45. );
  46.  
  47.  
  48.  
  49. /**
  50.  * Search engines for statistics
  51.  *
  52.  * The following substrings will be looked up in the referer http header
  53.  * in order to identify search engines
  54.  *
  55.  * @global array $search_engines 
  56.  */
  57. $search_engines array(
  58.     'google.',
  59.     '.hotbot.',
  60.     '.altavista.',
  61.     '.excite.',
  62.     '.voila.fr/',
  63.     'http://search',
  64.     'search.',
  65.     'search2.',
  66.     'http://recherche',
  67.     'recherche.',
  68.     'recherches.',
  69.     'vachercher.',
  70.     'feedster.com/',
  71.     'alltheweb.com/',
  72.     'daypop.com/',
  73.     'feedster.com/',
  74.     'technorati.com/',
  75.     'weblogs.com/',
  76.     'exalead.com/',
  77.     'killou.com/',
  78.     'buscador.terra.es',
  79.     'web.toile.com',
  80.     'metacrawler.com/',
  81.     '.mamma.com/',
  82.     '.dogpile.com/',
  83.     'search1-1.free.fr',
  84.     'search1-2.free.fr',
  85.     'overture.com',
  86.     'startium.com',
  87.     '2020search.com',
  88.     'bestsearchonearth.info',
  89.     'mysearch.com',
  90.     'popdex.com',
  91.     '64.233.167.104',
  92.     'seek.3721.com',
  93.     'http://netscape.',
  94.     '/searchresults/',
  95.     '/websearch?',
  96.     'http://results.',
  97.     'baidu.com/',
  98.     'reacteur.com/',
  99.     'http://www.lmi.fr/',
  100.     'kartoo.com/',
  101. );
  102.  
  103.  
  104. /**
  105.  * UserAgent identifiers for logging/statistics
  106.  *
  107.  * The following substrings will be looked up in the user_agent http header
  108.  *
  109.  * @global array $user_agents 
  110.  */
  111. $user_agents array(
  112.     // Robots:
  113.      array('robot''Googlebot/''Google (Googlebot)' ),
  114.     array('robot''Slurp/''Inktomi (Slurp)' ),
  115.     array('robot''Yahoo! Slurp;''Yahoo (Slurp)' ),
  116.     array('robot''msnbot/''MSN Search (msnbot)' ),
  117.     array('robot''Frontier/',    'Userland (Frontier)' ),
  118.     array('robot''ping.blo.gs/''blo.gs' ),
  119.     array('robot''organica/',    'Organica' ),
  120.     array('robot''Blogosphere/''Blogosphere' ),
  121.     array('robot''blogging ecosystem crawler',    'Blogging ecosystem'),
  122.     array('robot''FAST-WebCrawler/''Fast' ),            // http://fast.no/support/crawler.asp
  123.     array('robot''timboBot/''Breaking Blogs (timboBot)' ),
  124.     array('robot''NITLE Blog Spider/''NITLE' ),
  125.     array('robot''The World as a Blog ''The World as a Blog' ),
  126.     array('robot''daypopbot/ ''DayPop' ),
  127.     // Aggregators:
  128.     array('aggregator''Feedreader''Feedreader' ),
  129.     array('aggregator''Syndirella/',    'Syndirella' ),
  130.     array('aggregator''rssSearch Harvester/''rssSearch Harvester' ),
  131.     array('aggregator''Newz Crawler',    'Newz Crawler' ),
  132.     array('aggregator''MagpieRSS/''Magpie RSS' ),
  133.     array('aggregator''CoologFeedSpider''CoologFeedSpider' ),
  134.     array('aggregator''Pompos/''Pompos' ),
  135.     array('aggregator''SharpReader/',    'SharpReader'),
  136.     array('aggregator''Straw ',    'Straw'),
  137. );
  138.  
  139.  
  140. /**
  141.  * Do you want to check if referers really do refer to you before logging them
  142.  *
  143.  * WARNING: this is very time consuming!
  144.  *
  145.  * @global boolean $doubleCheckReferers 
  146.  */
  147. $doubleCheckReferers 0;        // Set to 1 to enable double checking
  148.  
  149.  
  150. # Do not change the following unless you know what you're doing...
  151. # Due to potential non-thread safety, we'd better do this early
  152. if!isset$HTTP_REFERER ) )
  153. {    // If this magic variable is not already set:
  154.     ifisset($_SERVER['HTTP_REFERER']) )
  155.     {    // This would be the best way to get the referrer,
  156.         // unfortunatly, it's not always avilable!! :[
  157.         // If someone has a clue about this, I'd like to hear about it ;)
  158.         $HTTP_REFERER $_SERVER['HTTP_REFERER'];
  159.     }
  160.     else
  161.     {    // Fallback method (not thread safe :[[ )
  162.         $HTTP_REFERER getenv('HTTP_REFERER');
  163.     }
  164. }
  165.  
  166.  
  167. ?>

Documentation generated on Tue, 20 May 2008 01:55:46 +0200 by phpDocumentor 1.4.2