$time) if($time + 500 < time()) unset($counterData['whoIsOnline']); // Speichern $myData = file_get_contents(__FILE__); $myData = preg_replace('/\$serialized_counterData = \'.*\';/siU', '$serialized_counterData = \''.serialize($counterData).'\';', $myData); $myFile = fopen(__FILE__, 'wb'); fwrite($myFile, $myData); fclose($myFile); // Ausgeben echo('Hits: '.$counterData['hits'].'
'); echo('Besucher: '.$counterData['visits'].'
'); echo('Gestern: '.$counterData['yesterDay'].'
'); echo('Heute: '.$counterData['toDay'].'
'); echo('Online: '.count($counterData['whoIsOnline']).'
'); ?>