As I said. Which do you want? You haven't defined the requirements
sufficiently so there is no answer to your question.
Do you want something that executes client side? Or do you want
something that executes server side? Two entirely different approaches
to the problem, requiring two entirely different answers.