More IP info. I get data like this (when printing out some added debug code to see them $item['count'] for each entry:
Code:
211540739 -> US -> 1 ->17
212681730 -> US -> 1 ->17
214962100 -> US -> 1 ->17
215641169 -> US -> 1 ->17
215650894 -> US -> 1 ->17
215630563 -> US -> 1 ->17
215698855 -> US -> 1 ->17
215837282 -> US -> 1 ->17
215915896 -> US -> 1 ->17
201656985 -> US -> 1 ->17
2097169078 -> JP -> 1 ->17
2155237942 -> US -> 3 ->17
2157127178 -> US -> 2 ->17
and this line:
Code:
$updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
Would seemingly only be adding 1 to the value, not 1 for every instance of US in the list.
I changed it to this:
Code:
if (isset($database_country["$coucode"]))
{
$item['count'] += $updatecache["country_||_$coucode"][1];
$updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
}
break;
So that multiple "US" (or any other) entries would have a cumulative effect on the total. This appears to be working, however, your historial data prior to this change will be very inaccurate and should be erased.
I also added line for all the other totals - I'm working to confirm this is works.
Code:
// MDP
$itemcnt = $item['count'] + $updatecache["browser_||_$browser[bstring]"][1];
$updatecache["browser_||_$browser[bstring]"] = array($existingcache["browser_||_$browser[bstring]"]['count'], $itemcnt, $existingcache["browser_||_$browser[bstring]"]['cmisc']);
// MDP
$itemcnt = $item['count'] + $updatecache["os_||_$browser[os]"][1];
$updatecache["os_||_$browser[os]"] = array($existingcache["os_||_$browser[os]"]['count'], $itemcnt, $existingcache["os_||_$browser[os]"]['cmisc']);
Code:
// MDP
$item['count'] += $updatecache["referrer_||_$item[cdata]"][1];
$updatecache["referrer_||_$item[cdata]"] = array($existingcache["referrer_||_$item[cdata]"]['count'], $item['count'], $existingcache["referrer_||_$item[cdata]"]['cmisc']);
Code:
// MDP
$item['count'] += $updatecache["screendepth_||_$depthstring"][1];
$updatecache["screendepth_||_$depthstring"] = array($existingcache["screendepth_||_$depthstring"]['count'], $item['count'], $existingcache["screendepth_||_$depthstring"]['cmisc']);
Code:
// MDP
$item['count'] += $updatecache["screenresolution_||_$item[cdata]"][1];
$updatecache["screenresolution_||_$item[cdata]"] = array($existingcache["screenresolution_||_$item[cdata]"]['count'], $item['count'], $existingcache["screenresolution_||_$item[cdata]"]['cmisc']);