|
LinkID |
Resolved Link |
Total Clicks |
Date Added |
keys("tracking:clicks:*");
rsort($stats);
$stats = array_slice($stats, 0, 5, true);
foreach($stats as $stat){ // There should only be 5, but the page doesn't limit how many
$id = explode(":", $stat);
$id = $id[2]; // Grab just the short link ID
$linkData = $redis->lRange("links:$id", 0, -1);
$link = $linkData[0];
$title = $linkData[1];
$date = $linkData[2];
$trackClicks = $redis->get("tracking:clicks:$id");
echo "
|
$id |
$link |
$trackClicks |
$date |
";
}
?>