Trending algorithm in PHP?

I’ve not seen nor ever put together such an algo myself, but I’ve been thinking about it.

The first thing I’d do is think about what kind of information I might need.

Number one is a way to store datetimes for each criteria I was interested in so I could do by week / month / year etc. if I wanted to.

You already mentioned

  • play
  • download
  • vote

I’m guessing you would need song name, and maybe, though it would make things more complex, info such as artist, genre, record label etc.

As far as weighting values with multiplication and / or log, sorry, but I have no idea ATM

.