simpleCounter_v0.2

kuzco

Avatar: kuzco

2012-05-24 16:01

Hello,
I have installed the simplecounter_v02. on QC5.1 free. It is working very well, but nevertheless I have an understanding problem:

In general.php I have added:
$config['disable_agents'] = 'robot|spider|crawler|curl|google|bingbot'; // robots that are disabled

Additionally I have changed the script in a way that all connections will be logged in 2 log-files. "normal connections" and "Bots" (date/Time, $_SERVER[REMOTE_ADDR], $_SERVER[HTTP_USER_AGENT]).

As far as I understood the script:

<?php
    
if( !preg_match('/'.$GLOBALS['config']['disable_agents'].'|^$/i'$_SERVER['HTTP_USER_AGENT'] ) && !isset( $_COOKIE['simpleCounter'] ) ){
?>


will verify if the HTTP_USER_AGENT will not contain one of the above agents.
Am I correct ?

When checking my logs, the following entry will be also included:
2012-05-24_15-38 | 77.116.246.138 | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0

Why is this logged in "Bots" ?

regards
kuzco

» Quick.Cart v5.x

Back to top
about us | contact