I would like to have a quiz with limited time for users to answer a question so they can’t google. Unfortunately, this time protection can easily be bypassed if I do it with client sided languages like JavaScript.
Is there a way to do this via PHP? It should be kind of secure.
Thanks in advance!
Sure, simply tell the user they have the set time to do it, and set a session variable like so:
As
time()gets the current epoch time in seconds, here you’re giving the user a minute. And when they submit: