Incorrect counter statistics
-
When using this WP plugin in a website at a hosting provider, the client IP address lookup sometimes does not work right. This is causing incorrect statistics on “visitors today” getting stuck at 1.
To solve this for v2.9, replace line 131 in wp-statsmechanic.php with the following:
$ip = $_SERVER['REMOTE_ADDR']; // Getting the user's computer IP if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { $ip = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])); }
Cheers,
Jack.
- The topic ‘Incorrect counter statistics’ is closed to new replies.