2
Hi deka,
You need to create a table that counts the id of the word and the unix timestamp of the hit. Then you also need to drop the table records when the unixtimestamp is more than 48 hours old otherwise you will end up with a huge table.
Once you have done that you need to do a select a bit like:
SELECT COUNT(*) as `rc`, `id` FROM `TABLE_NAME`WHERE timestamp > 13000000 ORDER BY RC DESC LIMIT 0,1
This will return the number of hits it has from largest to smallest with the id of the item. 13000000 has to equal 24 hours ago in unixtime which would be something like:
$time = time() - 60*60*24;