0, "unique_visits" => 0, "last_visit" => time(), "monthly" => [], "weekly" => [], "browsers" => [], "operating_systems" => [], ]; } // Read the stats from the file $fp = fopen($visitsFile, "r"); if ($fp === false) { die("Error opening the file."); } $data = fgets($fp); fclose($fp); $stats = json_decode($data, true); // Check if JSON decode failed if ($stats === null) { error_log("Failed to decode visits.json: " . json_last_error_msg()); return [ "total_visits" => 0, "unique_visits" => 0, "last_visit" => time(), "monthly" => [], "weekly" => [], "browsers" => [], "operating_systems" => [], ]; } return $stats; } $stats = getVisitStats(); ?> Website Stats

Website Stats

General Stats

Total Visits:

Unique Visits:

Last Visit Timestamp:

Monthly Visits

$count): ?>
Month Visits

Weekly Visits

$count): ?>
Week Visits
Week

Browser Stats

$count): ?>
Browser Visits

Operating System Stats

$count ): ?>
Operating System Visits

Just a Quick Note

We know, we know… this isn’t the most sophisticated way to track visitors. No fancy servers or big data here, just some humble tracking behind the scenes. But hey, it’s privacy-friendly! We’re not tracking your every move or creating a digital dossier, just counting visits in a way that doesn’t require selling your personal info to the highest bidder. So enjoy the stats, and know that your privacy is safe with us!