if you want to show all hits instead of all visits, use $totalhits:
$tothitsgbr = sprintf(“%06d”, $totalhits + 1553291);
To solve this: set the primary key of the table on both ip and tanggal fields instead of only the ip field, so the date is taken in consideration when adding rows to the table.
on line 137 add your old counter value tot the total hits counter:
e.g.
$tothitsgbr = sprintf(“%06d”, $tothitsgbr + 1553291);
good luck!