<?php
$statsFile = 'stats.json';
if (file_exists($statsFile)) {
$stats = json_decode(file_get_contents($statsFile), true);
echo "<h1>Download Statistics</h1><ul>";
foreach ($stats as $filename => $count) {
echo "<li><strong>$filename</strong>: $count downloads</li>";
}
echo "</ul>";
} else {
echo "No downloads recorded yet.";
}
?>