From afc2d2e4e1605c56294296894657d2c8c8a6b45c Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Sat, 20 Aug 2016 00:54:56 +0100 Subject: [PATCH] Implement priority banners. If the directory "banners_priority" exists and contains files, a file from it is served 33% of the time, an a file from "banners" 66% of the time. This may seem like an odd definition of "priority", but assuming far fewer priority banners than normal banners, this gives them extra weight in the selection. Before, any 1 banner in 100 had a 1% chance of being served; now if that banner is a priority banner it has a 33% chance. --- b.php | 64 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/b.php b/b.php index 9efa8afa..11d6ad34 100755 --- a/b.php +++ b/b.php @@ -1,21 +1,47 @@