We try to hotfix an old ASP.NET project. only got PHP experience yet.
Instead of the below, the 'Key' needs to be randomly selected from a list so that each "key" is used about equally often.
string sKey = ConfigurationManager.AppSettings["Key"];
(Referring to the web.config
file.)
For example 10000 people use the site per day, 20000 pageviews. now there are 20 keys* and each should be used for approximately 500 users** or for approximately 1000 pageviews**.
*(Currently in a static file, "keys.txt", one key per line)
**(users can only be distinguished by their IPv4s, but total random is ok too)